W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

RE: HTTP-GET of XML file

From: Ailleen Lien <alien@clientsoft.com>
Date: Wed, 24 Jan 2001 12:28:21 -0500
Message-ID: <F3327358F65CD31196DE00A0C9FC4F790C35F1@MAIL>
To: 'Markus Bäurle' <m.baeurle@caa.de>
Cc: "'www-lib@w3.org'" <www-lib@w3.org>
    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"));

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


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
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
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

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

Raiffeisenstr. 34
70794 Filderstadt-Bonlanden
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:28:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:53 UTC