Re: [xml] Avoiding emediate close of elements




Martin Olsen wrote:
On Wednesday 07 October 2009 13:07:41 you wrote:
  
Use xmlTextWriterStartElement or xmlTextWriterStartElementNS with
xmlTextWriterFullEndElement
    
Thanks! Unfortunately, I still get the same result.

Here's the smallest code to reproduce:
    writer = xmlNewTextWriterDoc( &doc, 0 );
    xmlTextWriterStartDocument( writer, NULL, "UTF-8", NULL );
    xmlTextWriterStartElement( writer, BAD_CAST "element" );
    xmlTextWriterFullEndElement( writer );
    xmlTextWriterEndDocument( writer );
    xmlSaveFile( "-", doc );

Any other suggestions?
  

Just add empty space in the tag. That will force the <tag></tag>




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