Configure a SAX-writer
- Last Updated: June 7, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Next, you configure the values that control how the write occurs. Below are some steps you might want to consider:
- If you are reusing a SAX-writer object for multiple writes,
call the
RESETmethod to clear the object and reset the default values. - Use the
SET-OUTPUT-DESTINATIONmethod to declare the output destination and its type (file,longchar,memptr,stream). - Set the
VERSION,ENCODING, andSTANDALONEattributes to ensure that the XML documents prolog is correctly configured. - Set the
FRAGMENTattribute if you are writing XML content that is not a complete XML document. - Set the
FORMATTEDattribute if you want the XML output to have extra whitespace for easy readability. - Set the
STRICTattribute toFALSEif you do not want the write to fail if the parser detects invalid XML.
Here is an example:
|