I have XML like
<A>
<B>
<C>
Hello World
</C>
</B>
</A>
I want to replace the starting tag’s "<" with "<ns:" in each tag resulting the following XML
<ns:A>
<ns:B>
<ns:C>
Hello World
</ns:C>
</ns:B>
</ns:A>
What should be the regular expression I should use in text editor to replace and include the namesapace
I was trying to use regex [<][^/] but it selects the 1st character of the starting tag also which I don’t want to replace.
Note: I have the above requirement for manual editing purpose in an editor where regex replace is supported. I was not going to do the above task programmatically .And the output XML fragment requested is an inner part of the complete XML , hence namespace URI is not mentioned
Use this regex replacement: