Regular expression for to replace XML node

Posted on 2011-10-17
Last Modified: 2012-05-12

I have following XML:

<?xml version="1.0" encoding="UTF-8"?>



<channel about="">
<title>US-CERT Technical Cyber Security Alerts</title>
<description>US-CERT Technical Cyber Security Alerts provide timely
information about current security issues, vulnerabilities, and
<rights>Produced 2011 by US-CERT, a government organization.</rights>
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />
  <li resource="" />

I am using this XML in Nintex Workflow. I want to write a regular expression to replace all xmlns strings (in bold above) with empty strings. What could be the regular expression which identifies the pattern in it. I tried (<RDF)[a-b1-9/.=#"](>) but it does not work.

Please help. Thanks !
Question by:pratz09
    LVL 74

    Accepted Solution

    How about:


    Open in new window

    LVL 74

    Expert Comment

    by:käµfm³d 👽
    Alternatively, you might try:


    Open in new window


    Author Closing Comment

    Thanks a lot !!!!
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    NP. Glad  to help = )

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
    The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now