IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

XMLw Class

Properties   Methods   Events   Configuration Settings   Errors  

The XMLw component provides an easy way to generate well-formed XML documents.

Syntax

ipworks.xmlw()

Remarks

The XMLw class creates XML documents while providing you control over every aspect of the document.

To use the class first decide whether or not to write to file, a stream, or to OutputData. To write to file set OutputFile. To write to a stream call SetOutputStream. If neither OutputFile nor SetOutputStream are used the document will be created in memory and will be available from OutputData.

To begin writing the XML document first call WriteXMLDeclaration. While this is not required is it suggested so that your XML document contains a traditional XML declaration at the beginning of the document.

Next begin adding elements to your document. Calling StartElement will open an element with the specified name. To create a nested structure continue calling StartElement to open more child elements. To write a value within an element call WriteString. To close the element that was last opened call EndElement. Each time EndElement is called the element at the current level is closed. Alternatively, calling WriteElement will write the element specified with the value specified and will also close the element.

To write an attribute of the current element, after calling StartElement call WriteAttribute. Call WriteAttribute multiple times to add multiple attributes.

Writing comments or CDATA can be done at any time with the WriteComment and WriteCData methods.

To close your XML document call Close. You can call Close from any location and it will close any remaining open elements automatically.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

EOLThe characters to use for separating lines.
IndentThe characters to use for each indentation level.
OutputDataThe buffered XML output data.
OutputFileThe path to a local file where the output will be written. If the file exists, it is overwritten.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

CloseCloses the component writing stream.
ConfigSets or retrieves a configuration setting .
EndElementWrites the closing tag of an open XML element.
ResetReset the component.
StartElementWrites the opening tag of an XML element.
WriteAttributeWrites an XML attribute.
WriteCDataWrites an XML CDATA block.
WriteCommentWrites an XML comment block.
WriteElementWrites a simple XML element with a value.
WriteRawWrites a raw XML fragment.
WriteStringWrites text inside an XML element.
WriteXMLDeclarationWrites an XML declaration at the top of the document.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

CharsetSpecifies the charset used when encoding data.
QuoteCharQuote character to use for attribute values.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0