XML Parsing Error

Discussion in 'PHP' started by a389951l, Dec 21, 2005.

  1. #1
    Not sure if this really belongs in the forum but since most of the code that I am fixing is PHP I figured it was the right place.

    Okay. I am an beginner PHP programmer but I have always been able to fix most of the bugs that I have found when I have purchased sites. I haven't built up a a new site using php just yet.

    So, here is my problem. This site is programmed with PHP, XML, and XSLT. I am getting the following error:

    Sorry, /home/xyz/www/xml/equipment /985a9215f21d20fb6e58ecba72d4e936.xml could not be transformed by /home/xyz/www/xslt/equipment/manufacturer.xsl into the $result variable the reason is that XML parser error 4: not well-formed (invalid token) and the error code is 2

    I have checked things out and it appears that there are non-standard characters within the xml document - this error is not global. So I am on the right track? And is there a way to transform the content to be standard xml characters &amp instead of & before the php code writes it to the xml file. Or am I totally off base.

    I am not looking for the answer (if it is an easy one, then great let me have it :D) but rather pointers or resources to help me change the code so this can work.
     
    a389951l, Dec 21, 2005 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Why is there a space in the path?

    /home/xyz/www/xml/equipment /985a9215f21d20fb6e58ecba72d4e936.xml
     
    noppid, Dec 21, 2005 IP
  3. a389951l

    a389951l Must Create More Content

    Messages:
    1,885
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Typo on my part with the space in the error message.
     
    a389951l, Dec 21, 2005 IP
  4. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #4
    I've seen somthing similar before and it was the format the editor saved in inserting hidden tabs, I assume, that the XML parsers choke on.

    I'm not sure if that is your problem, but it's worth a look.

    Good luck.
     
    noppid, Dec 21, 2005 IP