Search: 
Available in: IP*WORKS!
Xmlp Class
XMLp Component [IP*Works! V8]

Properties   Methods   Events   Configuration Settings  

The XMLp component implements a SAX2-compliant XML parser used to parse and verify the structure of XML documents.

NOTE: What follows is a very short description of the component interfaces. For more information, please consult the help files that come with the respective package.

Remarks

The XMLp component parses XML documents and verifies that they are well-formed. The results are provided through a set of events complying with the SAX2 specification.

In addition, the document structure may be queried through an XPath mechanism that supports a subset of the XPath specification.

The parser is optimized for read applications, with a very fast engine that builds internal DOM structures with close to zero heap allocations.

The component takes pieces of XML code through the Input method, until Flush is called. The document is parsed and fires events like StartElement, EndElement, Characters, IgnorableWhitespace, PI, etc. Entities are evaluated inside the EvalEntity event. If BuildDOM is set to True, an internal DOM structure is created, which in turn enables properties such as XPath, XElement, XText, etc. which allow traversal of the document structure.

When XPath is set to a valid path, XElement points to the name of the element, with XParent, XNamespace, XPrefix, XChildren, and XText providing other properties of the element. The XAttributes collection provides the attributes of the current element.

An additional "relaxed" mode allows for lexical parsing of non-XML documents (e.g. HTML). This is enabled by setting Validate to False. In this case, events will be fired as elements, entities, etc. are encountered, but the structure of the document will not be checked for "well-formedness", and the internal DOM structure will not be built.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for complete descriptions.

BuildDOM When True, an internal object model of the XML document is created.
ExtraNameChars Extra characters for the parser to consider as name characters.
ExtraSpaceChars Extra characters for the parser to consider as white space.
FlushOnEOL If set, the parser flushes its text buffer after every line of text.
Namespaces Collection of namespaces in the current namespace stack.
Offset Current offset of the document being parsed.
Validate When True, the parser checks that the document consists of well-formed XML.
XAttributes A collection of attributes of the current element.
XChildren Collection of child elements of the current element.
XElement The name of the current element.
XNamespace The namespace of the current element.
XParent The parent of the current element.
XPath Provides a way to point to a specific element in the document.
XPrefix The prefix of the current element.
XSubTree A snapshot of the current element in the document.
XText The text of the current element.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for complete descriptions.

Attr Returns the value of the specified attribute.
Config Sets or retrieves a component configuration setting.
Flush Flushes the parser and checks its end state.
Input Provides input to the parser.
ParseFile Parses the file specified by FileName.
Reset Resets the parser.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for complete descriptions.

Characters Fired for plain text segments of the input stream.
Comment Fired when a comment section is encountered.
EndElement Fired when an end-element tag is encountered.
EndPrefixMapping Fired when leaving the scope of a namespace declaration.
Error Information about errors during data delivery.
EvalEntity Fired every time an entity needs to be evaluated.
IgnorableWhitespace Fired when a section of ignorable whitespace is encountered.
Meta Fired when a meta section is encountered.
PI Fired when a processing instruction section is encountered.
SpecialSection Fired when a special section is encountered.
StartElement Fired when a begin-element tag is encountered in the document.
StartPrefixMapping Fired when entering the scope of a namespace declaration.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for complete descriptions.

CacheContent If true, the original XML is saved in a buffer
CodePage The system code page used for Unicode to Multibyte translations (Windows/COM only).
IgnoreBadAttributePrefixes If true, bad (unknown) attribute prefixes are ignored
IgnoreBadElementPrefixes If true, bad (unknown) element prefixes are ignored

| About | Privacy Policy | Terms of Use |
© Copyright 2008 /n software inc.