[xml] XML output file doesn't have line breaks



Hello

I am using libxml2-2.6.7.win32 to parse an existing and write a new XML file.
These are the function calls used:

m_writer = xmlNewTextWriterFilename(m_filename.c_str(), 0);
xmlTextWriterStartDocument(m_writer, NULL, MY_ENCODING, NULL);
xmlTextWriterWriteDTD(m_writer, BAD_CAST "gxl", NULL,
                DTD_FILENAME, NULL);

xmlTextWriterStartElement(m_writer, BAD_CAST "gxl");
xmlTextWriterWriteAttribute(m_writer, BAD_CAST "xmlns:xlink",
                                     BAD_CAST "http://www.w3.org/1999/xlink";);
xmlTextWriterEndElement(m_writer);


xmlTextWriterEndDocument(m_writer);

The output file looks like this:

_____________________________________________________________________________
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE gxl SYSTEM "gxl-1.0.1.dtd"><gxl xmlns:xlink="http://www.w3.org/1999/xlink";><graph 
id="CDL_Graph"><node id="id100"><type xlink:href="columbus_cpp_schema-2.0.gxl#struc:Namespace"/><attr 
name="name"><string>global namespace</string></attr></node></graph></gxl>
_____________________________________________________________________________

Who do i add line breaks?

Thanks!

Yours, Philipp




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