AW: HTTP-GET of XML file

Hi Ailleen,

this works perfect, I only had to use your line from below to set the output
format and everything's fine!
Thank you so much, I can finally move on to feeding the XML stream to a
parser.
I was really stuck and you helped me out so quickly. I love the community
where people often help each other out much better than commercial support
can do, as this example has proven quite successfully.
Hope I can give something back sometime.

So long,

Markus Bäurle

> -----Ursprüngliche Nachricht-----
> Von: Ailleen Lien [mailto:alien@clientsoft.com]
> Gesendet: Mittwoch, 24. Januar 2001 18:28
> An: 'Markus Bäurle'
> Cc: 'www-lib@w3.org'
> Betreff: RE: HTTP-GET of XML file
> 
> 
> Hi,
>     You may try  the followings:
> 
> 	/* Create a request */
> 	request = HTRequest_new();
> 	/* Set the default output to "asis" */
> 	HTRequest_setOutputFormat(request, HTAtom_for("text/xml"));
> 
> 	/* Get an anchor object for the destination URI */
> 	dst = HTAnchor_findAddress(dst_str);
> 
> 	src = HTTmpAnchor(NULL);
> 
> 	HTAnchor_setDocument(src, src_str);
> 	//HTAnchor_setFormat(src, WWW_PLAINTEXT);
> 	HTAnchor_setFormat(src, HTAtom_for("text/xml"));
>       HTAnchor_setCharset(src, HTAtom_for("UTF-8"));
> 
> 
> Regards,
> Ailleen Lien
> 
> 
> -----Original Message-----
> From: Markus Bäurle [mailto:m.baeurle@caa.de]
> Sent: Wednesday, January 24, 2001 11:48 AM
> To: 'www-lib@w3.org'
> Subject: HTTP-GET of XML file
> 
> 
> Hello,
> 
> I'd be very glad if somebody could help me with this problem:
> 
> I'm trying to build on the chunkbody example to fetch an XML 
> file from a web
> server.
> It all works fine if I'm fetching an HTML file, but with an XML file,
> HTLoadAnchorToChunk() returns
> a zero size chunk (output format is set to WWW_SOURCE with
> HTRequest_setOutputFormat()).
> With an output format of WWW_RAW, there is a delay of about 
> 14 seconds (!)
> before I get the chunk, but this is not ideal anyway as I 
> don't want the
> header.
> 
> What do I need to set/change to get an XML file without 
> problems? I know it
> must have something to do with the content type being 
> different but haven't
> quite understood how this changes the behaviour of 
> the libwww.
> 
> Thanks in advance for any help!
> 
> Mit freundlichen Grüssen / Best regards
> 
> Markus Bäurle
> Softwareentwicklung / Software Development
> 
> CAA AG
> Raiffeisenstr. 34
> 70794 Filderstadt-Bonlanden
> Germany
> Tel:  +49 / 711 / 9 0 77 0 - 363
> Fax: +49 / 711 / 9 0 77 0 - 199
> E-Mail: m.baeurle@caa.de
> Web: http://www.caa.de
> 

Received on Wednesday, 24 January 2001 12:38:21 UTC