[fpc-pascal] XML: how to change first line?
Reinier Olislagers
reinierolislagers at gmail.com
Sun Jul 24 09:57:50 CEST 2011
Hi list,
I'm writing XML export for datasets using the XMLWrite and DOM units (as
per documentation at http://wiki.lazarus.freepascal.org/XML_Tutorial)
I've got this snippet:
FOutputDoc := TXMLDocument.Create;
How do I change the first line of the generated XML output from
<?xml version="1.0">
to
<?xml version="1.0" standalone="yes"?>
I tried adding an attribute like this:
TDOMElement(FOutputDoc.DocumentElement).SetAttribute(
'standalone', UTF8Decode('yes'));
but that gave an access violation: DocumentElement property is read-only...
Thanks,
Reinier
More information about the fpc-pascal
mailing list