So I've tried parsing (using PHP) the XML file that you guys provide through your export feature...and I've had no luck. I've tried parsing the examples too, but those fail also.
I wrote my own parser and I thought perhaps I did something wrong, so I tried free demo parsers around the net, those didn't work either.
File attempted to parse: http://anidb.info/export/examples/xml/mylist.xml
Parsing demos:
http://keithdevens.com/software/phpxml/xml-to-php
and
http://www.magicparser.com/demo
If you paste the mylist.xml link into either of those, they both fail. I tried my own parser too, and it can't get past the first item. Also tried parsing the xml-dark, plain and whatnot.
Any help?
[FIXED] Can't parse exported XML file?
Moderator: AniDB
The file in question uses a xsl stylesheet, which neither can handle, strip out the xsl-stylesheet header and try again on this:
http://keithdevens.com/software/phpxml/xml-to-php
http://keithdevens.com/software/phpxml/xml-to-php
Thanks for the quick reply Petri. I took out the xsl header and it successfully parsed the file but it can't use the item elements correctly (not in my parser, keith deven's, or magicparser.com).
Here's the file without the XSL: http://www.xinil.net/temp/anidbXML.xml
Edit: Seems it was because I didn't save the edited file in UTF-8. All good now. Thanks
Here's the file without the XSL: http://www.xinil.net/temp/anidbXML.xml
Edit: Seems it was because I didn't save the edited file in UTF-8. All good now. Thanks
I should also mention that when I try exporting my list, it doesn't give me a direct download link anymore (after i get the message saying it's ready to download.
---
Your scheduled Mylist Export was just created and is now ready for download.
Template: xml-plain
Requested at: 22.02.2007 18:23
Finished at: 22.02.2007 20:21
Direct Download:
--
Looking at the HTML, i'm provided with:
Direct Download: <a href="http://anidb.info/export/"></a>
---
Looking at the hidden form too:
<input type="hidden" name="msg.body" value="Your scheduled Mylist Export was just created and is now ready for download.
Template: xml-plain
Requested at: 22.02.2007 18:23
Finished at: 22.02.2007 20:21
Direct Download: <a href="http://anidb.info/export/"></a>
" />
---
Your scheduled Mylist Export was just created and is now ready for download.
Template: xml-plain
Requested at: 22.02.2007 18:23
Finished at: 22.02.2007 20:21
Direct Download:
--
Looking at the HTML, i'm provided with:
Direct Download: <a href="http://anidb.info/export/"></a>
---
Looking at the hidden form too:
<input type="hidden" name="msg.body" value="Your scheduled Mylist Export was just created and is now ready for download.
Template: xml-plain
Requested at: 22.02.2007 18:23
Finished at: 22.02.2007 20:21
Direct Download: <a href="http://anidb.info/export/"></a>
" />
Thanks for the friendly words of encouragement. I've already programmed a feature into my site that successfully imports your XML file.PetriW wrote:Well, instead of reinventing the wheel you could test actually making a new export template instead... Granted by what I see here I have little hope of success...
You should probably try something easier before tackling this.
Good day.