Hi Juan Pablo,

At 18.14 07/03/2005 +0100, Martinez Sanchez, Juan Pablo (Carver) wrote:
Hello all,

I am using the xerces C++ library in order to generate XML files. The question is that a standalone tag is generated in the files, for example:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

And I do not know why, I have tried to remove this attribute because we do not need it but I have been unable to achieve it,
[...]
P.D.: The code I am using to create the DOMDocument is:
XMLCh tempStr[100];
XMLString::transcode("LS", tempStr, 99);
DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
doc = impl->createDocument( 0, /* root element namespace URI */
X("ACTION"), /* root element name */
0); /* document type object (DTD) */



I guess you are using DOMWriter to serialize the document; in this case you can only choose to print the <?xml header or not, but if you print it, you will have the "standalone" attribute (whose default value is "no").
If you need to have standalone="yes" printed, you can invoke doc->setStandalone(true).
For a description of what the attribute means, see http://www.w3.org/TR/2004/REC-xml-20040204/#sec-rmd


Hope this helps,
Alberto



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  • standalone Martinez Sanchez, Juan Pablo (Carver)
    • Alberto Massari

Reply via email to