Forum - View topicXML Response with PHP
|
Author | Message | ||
---|---|---|---|
jrock20041
Posts: 8 Location: PA |
|
||
So I am working on a page that takes in an anime title and you can get info on that title. I got curl setup and it seems to be returning me an xml object. But from here I cannot figure how to parse it. Can someone help?
|
|||
Shiroi Hane
Encyclopedia Editor
Posts: 7578 Location: Wales |
|
||
If you visit cdn.animenewsnetwork.com/encyclopedia/api.xml?title=~One%20Piece you can see the XML itself.
I think I did once write some code for parsing XML but that was a long time ago and I can't even find it for reference. I almost certainly adapted code from the notes on php.net however, since that's what I usually did. This seems like the place to start? http://www.w3schools.com/php/php_xml_simplexml_read.asp http://php.net/manual/en/simplexml.examples-basic.php |
|||
jrock20041
Posts: 8 Location: PA |
|
||
Well I got it to work somewhat. It parses it now but its just putting everything into arrays and I am loosing the xml attributes. I tried doing this conversion in code pen with JS and it works a hell of alot better
|
|||
All times are GMT - 5 Hours |
||
|
Powered by phpBB © 2001, 2005 phpBB Group