Click here to Skip to main content
15,888,341 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am having an xml like,

XML
<root>
<name>
asdf
</name>
<age>
21
</age>
<city>
kjhgf
</city>
<root>


In the opening node i have to insert a string like,
O/P need like below,

XML
<root>
<name "a html tag">
asdf
</name>
<age "a html tag">
21
</age>
<city "a html tag">
kjhgf
</city>
</root>
Posted
Comments
Richard Deeming 14-Nov-14 8:51am    
The sample output you've posted isn't valid XML.

1 solution

You "like below" is not well-formed XML text, so, it is not XML at all.
Before working with XML, you need to start from learning what XML is, the language itself: http://en.wikipedia.org/wiki/XML[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900