1 Replies - 10351 Views - Last Post: 25 July 2012 - 01:41 PM Rate Topic: -----

#1 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3469
  • View blog
  • Posts: 10,688
  • Joined: 05-May 12

Is there a way to get valid XML from the DIC API?

Posted 25 July 2012 - 01:06 PM

Is there a relatively easy way to get valid XML from the DIC API?

My small scale experiments show that the XML that comes back from the DIC API is often invalid because an unencoded ampersand. If it's just unencoded characters, I can just preprocess the stream and apply the appropriate encoding. Is this the only case for invalid XML coming from the API? Or just the more common error and there are others like mismatched tags, etc.

Would I be in for a less frustrating experience if I just did page scraping rather than trying to massage the XML into something that is valid?

How does Tapatalk get the forum data?

Is This A Good Question/Topic? 0
  • +

Replies To: Is there a way to get valid XML from the DIC API?

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2870
  • View blog
  • Posts: 11,021
  • Joined: 15-July 08

Re: Is there a way to get valid XML from the DIC API?

Posted 25 July 2012 - 01:41 PM

You know, I made a post on this a while back and it was never handled. What I ended up doing is reading in the stream of broken XML and applying patches to make it valid. Since I knew what all the errors were, applying a patch was relatively easy.

If I can find my patching code, I'll let you know, but I will tell you that it is extremely slow, as I was a much younger programmer then.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1