![]() |
programmers - help with xml feed
So I am trying to read in an xml feed with php, however the feed has thrown me a bit of a curve ball.
It starts off as a normal xml feed, however mid way it changes and this is what is throwing me. How do I handle a feed that does the following : ? PHP Code:
cheers |
the right way: request to from the source of xml to send valid xml :-)
alternative way: sanitize the data, fix the xml or extract data with regexp -> but both is not the right way.... |
Quote:
Was hoping for a way to loop through without having to sanitize the data as you mentioned. Thanks for the reply. |
I feed most XML through DreamWeaver and add it as a recordset - It is pretty good at sorting out strange looking XML like that...
|
Quote:
Right now, I can read in bits of the xml feed, but not all of it because they have made it in such a shit of a way. |
Bump?............
|
I'm not sure if I catch the realy problem, does PHP accept the XML you get or you get there a error? If Simple XML or whatever engine you use take it, you could use xpath to get what you need.
|
can you give me a live url to the xml feed so i can give you the code?
chris @ lod.com |
XML Parsing Error: mismatched tag. Expected: </newelement>. |
Code:
$VAR1 = { |
create 1 php to sanitize data and or format the wront xml to correct xml,, then use your regular xml code to parse the xml.
or you can just create one file of it. |
You have elements and subelements. Please send me whole code you used to parse this, and one of my devs will fix it for you :thumbsup [email protected]
|
All times are GMT -7. The time now is 04:03 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123