[xml] xmlParseFile;encode - newbie question
- From: Pieter Louw <pieter uplink co za>
- To: xml gnome org
- Subject: [xml] xmlParseFile;encode - newbie question
- Date: Wed, 23 Feb 2005 12:55:40 +0200
Hi
I'm using libxml2-2.6.17 and my question is:
If I parse a file and there is an ampersand '&' in one of the elements,
then the function xmlParseFile return NULL.
If I change the & to & or remove it, then it works.
So I guess I must encode/convert the data in the file first before
sending it to xmlParseFile.
How will I encode the data?
xml data:
....
<name>Murray & Karl</name>
....
c code:
xmlDocPtr doc;
doc = xmlParseFile("myfile.xml");
if (doc == NULL)
printf("Error parsing file");
else
//run through tree
Thanks in advance
Regards,
Pieter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]