Forum Moderators: coopster

Message Too Old, No Replies

xml processing and single quotes

         

jackvull

10:06 am on Jun 6, 2006 (gmt 0)

10+ Year Member



Hi
I am having a real problem getting data from an XML file into variables when the XML file contains an apostrophe.
For example the XML has:
<name>Hearin' Aid</name>

I process this using addslashes through the parser but the variable I get has this:
' Aid'

Shouldn't addslashes be enough here or is there an option in the parser that I need to change?

jackvull

10:39 am on Jun 6, 2006 (gmt 0)

10+ Year Member



just so as to not cause confusion, this is not when inserting into a database, it is the actual variable holding the xml data that is represented as:
' Aid

instead of
Hearin' Aid

jackvull

11:44 am on Jun 6, 2006 (gmt 0)

10+ Year Member



If I echo the dat from the parser directly I get:
ArtistName = Hearin
'
Aid

So, it seems the parser is somehow interpreting the single quotes as a line feed and messing the whole thing up?