> Interesting..  So to be consistent with proper XML formatting,
> should the server hosting the XML file convert the & into
> & ?

It depends on the situation, I believe.  The server that sends you XML
should indeed provide you well-formed XML, which it's not doing.  Probably
what should happen is that the server sending the XML should urlencode URLs
in the cdata elements, and then after you parse the XML file you should
urldecode the URLs.  I would be surprised if this hasn't been done as some
standard part of XML parsing and I've just missed it in my limited use of
XML parsers.

> I certainly feel like I'm missing something...  Although I'm a bit at
> odds as to how to troubleshoot this new file.
> I no longer get the errors, but I'm not getting the results I'm looking
for either.


I'm not sure what results you're looking for exactly, but if you put in a
bunch of echo statements at various points throughout your parsing routines,
you will see that none of the "if x = y" conditions are matching.  Here's
what I'd recommend:

1.  put in a bunch of echo statements to print out your variables at
different points in your parsing, just to make sure it's doing what you
expect it to.  Do a full audit of your characterData routine through this
method, and I think it will show you where the errors are.  (I did not see
the exact error right away so I gave up since I do have a day job.  :-)

2.  keep your first eregi_replace statement, then when you're printing out
the links, re-convert it with a reverse eregi_replace to turn the & back
into a simple &.  This will send it to the HTML browser in the format you
want, I hope.

I hope this is of some help.

Pete.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to