Re: [xml] how-to ignore entities in text?



On Wed, 2009-04-22 at 11:06 -0500, Michael Cronenworth wrote:
Is there a way to ignore a "&" character contained inside of an XML tag? 
Normally this is used for entities, but I have a use for an XML tag to 
contain an "&" in this example:

<password>e$az_3{&dpp</password>

No, you need to escape it, e.g. &#38; or &amp;
Similarly for < (&lt;)

An XML processor is not allowed to claim that a file
with errors in it like this is XML.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]