[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Xml parsing error, XML parse failed at line 1, col 0: no elementfound



Thanks David,
My only problem was in the picky-eater category.  Expat doesn't do EBCDIC
and that's what I was feeding it.  Once I commented out the xlate, it went
fine.


Bruce McDougald
Compass Technologies
75 Maddox Rd., Ste 104
Buford, GA 30518
Office: 770-904-0488
Fax: 770-904-0411
bruce.mcdougald@xxxxxxxxxxxxxxxxxxxxxxxx

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David W. Crisman
Sent: Monday, June 16, 2008 3:46 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Xml parsing error, XML parse failed at line 1, col 0: no
elementfound

Bruce,

My only experience is with http_url_post_raw, and then I did the parsing
myself.

Have you tried http_url_get_xml()? It appears you would need something
like this: 
http_url_get_xml(peURL:%paddr('FVchangeXML'):*null:*null)

According to the documentation, your peStartProc needs to have an
interface that is compatible with 'StartProc' in the documentation. You
also need to have eXpat support.


Regards,
Dave Crisman





On Mon, 16 Jun 2008 09:54:24 -0400, "Bruce McDougald"
<bruce.mcdougald@xxxxxxxxxxxxxxxxxxxxxxxx> said:
> I'm getting this when trying to parse a simple xml document:
> 
> <?xml version="1.0"
>
encoding="UTF-8"?><ChAcctResponse><AccountNumber>0232100016</AccountNumber><
>
CardNumber>00000000100012</CardNumber><ReasonCode>0</ReasonCode></ChAcctResp
> onse>
> 
> I'm feeding it in from the command line like this:
> 
>  ===> call xmlparse '<?xml version="1.0"
> encoding="UTF-8"?><ChAcctResponse><Acco
>
untNumber>0232100016</AccountNumber><CardNumber>00000000100012</CardNumber><
> Reas
> onCode>0</ReasonCode></ChAcctResponse>'
> 
> 
> I distilled it down to that because I'm hoping to use HTTPAPI in a
> production web service client and I'm getting the same error there.  I'm
> using http_url_get_raw, and parsing the xml reply with
> http_parse_xml_string.  Here's my invocation of that:
> 
>      c                   eval      rc =
>      http_parse_xml_string(%addr(retdata)
>      c                                     :%len(%trim(retdata))
>      c                                     :HTTP_XML_CALC
>      c                                     :%paddr(FVchangeXML)
>      c                                     :*null
>      c                                     :*null)
> 
> >From just eyeballing the xml in debug, I can't find any problems with it.
> What am I missing?
> 
> Bruce McDougald
> Compass Technologies
> 75 Maddox Rd., Ste 104
> Buford, GA 30518
> Office: 770-904-0488
> Fax: 770-904-0411
> bruce.mcdougald@xxxxxxxxxxxxxxxxxxxxxxxx
> 

-- 
http://www.fastmail.fm - Accessible with your email software
                          or over the web

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------