xml parser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
revbackup
Forum Commoner
Posts: 29
Joined: Tue Jun 09, 2009 1:52 am

xml parser

Post by revbackup »

why can't the xml parser parse & and symbols like ą ????

it displays an error INVALID CHARACTER when I parse the xml....
what should I do so that I can parse symbols like these?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: xml parser

Post by requinix »

& is the start of an entity. If the characters coming after it don't make up an entity (there are only a handful in XML proper) then it's invalid XML.
ą has to be encoded properly. For example, the XML data itself could be UTF-8 encoded and the <?xml doc mentions encoding="utf-8".
Post Reply