Re: [xml] how to read from network by xmlReadFile
- From: "中井和広" <nakai kazuhiro sharp co jp>
- To: "Daniel Veillard" <veillard redhat com>
- Cc: xml <xml gnome org>
- Subject: Re: [xml] how to read from network by xmlReadFile
- Date: Thu, 25 Nov 2004 08:55:30 +0900
In a message dated Wed, 24 Nov 2004 19:56:30 +0900,
<veillard redhat com> wrote:
veillard>>
veillard>> doc = xmlReadFile("http://localhost/resource/test.xml")
veillard>
veillard> xmlReadFile takes 3 arguments. I don't believe your actually tried th
Oh. excuse me.
in fact, my codes are
conf_doc=cgi_readAgentDB("file:///mydir/template/agent_db.xml");
.....
xmlDocPtr cgi_readAgentDB(const char *filename)
{
xmlDocPtr doc;
......
doc = xmlReadFile(filename,NULL,0);
......
......
return doc;
}
and. I forgot other argument, when i post that question.
very sorry.
veillard>> but, error message (fail to load HTTP resource) returns.
veillard>
veillard> Works for me
veillard>
veillard>paphio:~ -> python
veillard>Python 2.2.3 (#1, Aug 8 2003, 08:44:02)
veillard>[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-13)] on linux2
veillard>Type "help", "copyright", "credits" or "license" for more information.
veillard>>>> import libxml2
veillard>>>> doc = libxml2.readFile('http://veillard.com/test.xml', None, 0)
veillard>>>> doc.serialize()
veillard>'<?xml version="1.0" encoding="iso-8859-1"?>\n<doc/>\n'
veillard>>>>
veillard>
veillard>either your libxml2 is compiled without HTTP support, or the HTTP
Is Supporting HTTP optional?
My. platform is gentoo. and I do nothing to libxml2, but emerge them.
Thank you.
I'll read libxml2 installing manual well again.
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
MAIL : nakai kazuhiro sharp co jp
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]