//Name DataType Subtype Length //Outs OutStream //F File //Reader Automation 'Microsoft XML, v6.0'.SAXXMLReader60 //Writer Automation 'Microsoft XML, v6.0'.MXXMLWriter60 F.QUERYREPLACE(FALSE); F.CREATE(FileName); F.CREATEOUTSTREAM(Outs); IF ISCLEAR(Writer) THEN CREATE(Writer); Writer.indent := TRUE; Writer.standalone := FALSE; Writer.omitXMLDeclaration := TRUE; Writer.encoding := 'utf-8'; IF ISCLEAR(Reader) THEN CREATE(Reader); Reader.contentHandler := Writer; Reader.dtdHandler := Writer; Reader.errorHandler := Writer; Reader.putProperty('http://xml.org/sax/properties/declaration-handler', Writer); Reader.putProperty('http://xml.org/sax/properties/lexical-handler', Writer); Reader.parse(PXMLDocOut); PXMLDocOut.loadXML(Writer.output); PXMLDocOut.save(Outs); F.CLOSE;
Comments
Thanks for sharing!
Object Manager
http://www.linkedin.com/in/larswestman