[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
"Re: [xml] Retrieve encoding from xml input document (ctxt->encoding)"
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: <xml gnome org>
- Subject: "Re: [xml] Retrieve encoding from xml input document (ctxt->encoding)"
- Date: Thu, 04 Dec 2003 15:06:49 +0100
Hi,
on 12/4/2003 2:43 PM Olivier Courtin wrote:
> I've got a little problem with libxml2 as i want to retrieve encoding
> type from xml input document.
> xmlParseDocument(ctxt);
The parsed document will be available in ctxt->myDoc.
> printf("[%s]\n", ctxt->encoding);
ctxt->myDoc holds the information you want.
printf("[%s]\n", ctxt->myDoc->encoding);
You may want to check first if the parsing went well, so look at
"http://www.xmlsoft.org/html/libxml-parser.html#xmlParseDocument"
Regards,
Kasimier
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]