I got this error, XML Parsing Error: Junk After Document Element. My XMl was like this,
<?xml version="1.0" encoding="iso-8859-1" ?><billing_id>1234</billing_id><f_name>adam</f_name>
After some searching, I knew why,
A well-formed XML document must have one, and only one, top-level element. Anything after that element's end-tag will be ignored at best, and possibly reported as an error such as the one you're getting here.
So I fixed the problem by adding a top-level element <rsp>
<?xml version="1.0" encoding="iso-8859-1" ?><rsp><billing_id>1234</billing_id><f_name>adam</f_name></rsp>
No comments:
Post a Comment