Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

escapting <br> tag inside a xml entry

Status
Not open for further replies.

yahoo182

Programmer
Jul 5, 2005
70
CA
Hi there,
I am a pretty newbie to XML. My question is
Say if I want to put a <br> tag inside a xml tag, how would I escape it

<test>
<entry1> blah blah <br> blah blah </entry1>
</test>


Attempting to show this would result in a compilation error on the browser side
 
<br/> or you could use the newline character &#010;

Jon

"Asteroids do not concern me, Admiral. I want that ship, not excuses.
 
You would use the XML entity values for the less-than and greater-than symbols:
Code:
<entry1> blah blah &lt;br&gt; blah blah </entry1>

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top