[xml] xmlWriter and Encoding
- From: Steffen Barszus <steffenbpunkt googlemail com>
- To: xml gnome org
- Subject: [xml] xmlWriter and Encoding
- Date: Sun, 19 Apr 2009 15:56:46 +0200
Hi !
I'm currently writing an application which is reading XML and writing
formatted Text to a file. I'm still in the process to learn C/C++, so
forgive me if i'm asking stupid questions ;)
For the app i use the XmlReader and XmlWriter. Based on environment i
want to write the file in system encoding. For testing i used this:
writer = xmlNewTextWriterFilename("test.epg", 0);
if (writer == NULL) {
printf("testXmlwriterFilename: Error creating the xml
writer\n");
return -27;
}
xmlTextWriterStartDocument(writer, NULL,"iso-8859-1",NULL);
I would like to use a similar simple way to set the encoding for the
written document, but as i don't write XML i don't need/can't have the
XML declaration in the output.
Is there any simple way of setting the encoding without writing the
declaration ?
Thanks !
Steffen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]