Re: AW: [xml] [libxml2] xmlwriter in vc++ 6.0



Ok, I will give a little mofe details:
 
After running:
 
writer = xmlNewTextWriterDoc(&doc, 0);
 
I can see that all members of doc are initialized to NULL's but arter running functions:
 
xmlTextWriterStartDocument(writer, NULL, NULL, NULL);
xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");
xmlTextWriterEndElement(writer);
xmlTextWriterEndDocument(writer);
 
xmlDocPtr doc is stil initializet to NULL'a :( For verification I do this:

xmlSaveFileEnc(a_OutputPath, doc, "iso-8859-1")

and as result of this code I get something like this:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>

So it looks like no data was written to writer (and doc) :(

You'v got any idee what can be wrong?

I use limxml2 as a dll.

Karol.

"Mickautsch, Alfred" <alfred mickautsch schuler-ag com> wrote:

Hello,
 
xmlWriter functions return 0 most of the time. This is because of the internal caching. You should only
bother if they return -1. This means that an error has occured.
 
Servus -- Alfred
-----Urspr?he Nachricht-----
Von: xml-admin gnome org [mailto:xml-admin gnome org]Im Auftrag von Karol Rewera
Gesendet: Mittwoch, 28. April 2004 16:26
An: xml gnome org
Betreff: [xml] [libxml2] xmlwriter in vc++ 6.0

Hello!
I'm trying to create XML document with xml writer in Visual Studion 6.0. Here's code fragment:
 
LIBXML_TEST_VERSION;
xmlTextWriterPtr writer;
xmlDocPtr doc;
 
writer = xmlNewTextWriterDoc(&doc, 0);
xmlTextWriterStartDocument(writer, NULL, NULL, NULL);
xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");
xmlTextWriterEndElement(writer);
xmlTextWriterEndDocument(writer);
xmlFreeTextWriter(writer);
 
xmlNewTextWriterDoc(&doc, 0) works fine, but xmlTextWriterStartDocument, xmlTextWriterStartElement wtires no bytes to doc (functions returns 0 ) :(
What I'm doing wrong, help
 
Karol Rewera


--
Pozdrawiam,
 Karol Rewera


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs


--
Pozdrawiam,
 Karol Rewera


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]