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

XMLw Bean

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 component creates XML documents while providing you control over every aspect of the document.

To use the component 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 bean 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 bean 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.
setOutputStreamSets the stream to which the XML will be written.
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 bean 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 bean 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