At 00:17 17/07/01, Williams, Brad wrote:
>I was wondering if anyone can help me with what should be a simple issue: I
>need to output an '&' in my XML file, but have been only able to do this by
>escaping it like &. This means that my output is brad&bill rather
>than brad&bill. Can someone please help me get this result using a
>validating parser?
I'm not sure I understand what your problems is: you're correct that you
have to escape '&' as '&'
When reading an XML document the parser will decode the '&'
transparently (i.e. it will return 'brad&bill'); when writing it will
insert the '&' automatically (i.e. you give it '&' and it writes
'brad&bill'). You only need to worry about the entity when you write XML
without the help of a parser.
--ben
Applied XML Solutions at www.marchal.com
"concise, useful, and illuminating," Dr Dobbs Journal
------ XML/edi Group Discussion List ------
Homepage = http://www.XMLedi-Group.org
Unsubscribe = send email to: [EMAIL PROTECTED]
Leave the subject and body of the message blank
Questions/requests: [EMAIL PROTECTED]
To receive only one message per day (digest format)
send the following message to [EMAIL PROTECTED],
(leave the subject line blank)
digest xmledi-group your-email-address
To join the XML/edi Group complete the form located at:
http://www.xmledi-group.org/xmledigroup/mail1.htm