::class xmlParser public

CLASS: xmlParser

A non-validating simple XML parser. The parser recognizes the following:


Definition at line 2882 of xmlDOM.cls

Public Methods

  init (domBuilder)
domDocument - the DOM created from the input stream or .nil in case of errors parseStream (xmlStream)
domDocument - the DOM created by the builder or .nil in case of errors. parseString (xml)
text - The string with whitespace removed, if there was any. removeIgnorableWhiteSpace (text)

Private Methods

  parseAttributes (attributes)
text - The string with entities resolved if any. resolveEntities (text)

Private Attributes

  domBuilder

Instantiated by

tryxmldom.rex line 16

Feature Detail

xmlParser::attribute domBuilder private

The DOM builder given as parameter at instance creation time

Definition at line 2886 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2893 "self~domBuilder = domBuilder"
xmlDOM.cls line 2917 "self~domBuilder~startDocument"
xmlDOM.cls line 2938 "self~domBuilder~haveText(self~resolveEntities(text))"
xmlDOM.cls line 2946 "self~domBuilder~haveComment(comment)"
xmlDOM.cls line 2951 "self~domBuilder~havePI(target, data)"
xmlDOM.cls line 2956 "self~domBuilder~haveCDATA(rawText)"
xmlDOM.cls line 2961 "self~domBuilder~startElement(tagName)"
xmlDOM.cls line 2964 "self~domBuilder~endElement(tagName)"
xmlDOM.cls line 2969 "self~domBuilder~endElement(tagName)"
xmlDOM.cls line 2974 "self~domBuilder~startElement(tagName)"
xmlDOM.cls line 2980 "self~domBuilder~endDocument"
xmlDOM.cls line 2981 "return self~domBuilder~doc"
xmlDOM.cls line 3001 "self~domBuilder~nameAttr(attrName)"
xmlDOM.cls line 3002 "self~domBuilder~valueAttr(self~resolveEntities(attrValue))"

xmlParser::method init

The xmlParser constructor.

Parameters
domBuilder - the DOM builder the parser should use

Definition at line 2891 of xmlDOM.cls

xmlParser::method parseStream

Converts a XML file or stream into a string and passes the string on to parseString.

Parameters
xmlStream - An object with a supplier method
Returns
domDocument - the DOM created from the input stream or .nil in case of errors

Definition at line 2900 of xmlDOM.cls
Dynamically referenced by
tryxmldom.rex line 17 "dom = parser~parseStream(xmlStream)"

xmlParser::method parseString

Analyzes the input string for situations the DOM builder wants to know about and invokes the appropiate methods for
the builder to handle the situations.

Parameters
xml - the XML string to be parsed.
Returns
domDocument - the DOM created by the builder or .nil in case of errors.

Definition at line 2915 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2908 "return self~parseString(xml)"

xmlParser::method parseAttributes private

Processes the attributes specified within an element tag and passes them on the the builder.

Parameters
attributes - the string containing all the attributes specifications within an element tag.

Definition at line 2986 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2963 "self~parseAttributes(self~removeIgnorableWhiteSpace(attributes))"
xmlDOM.cls line 2976 "self~parseAttributes(self~removeIgnorableWhiteSpace(attributes))"

xmlParser::method removeIgnorableWhiteSpace

Returns a string with whitespace removed.

Parameters
text - A string with embedded whitespace, perhaps
Returns
text - The string with whitespace removed, if there was any.

Definition at line 3010 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2937 "if self~removeIgnorableWhiteSpace(text)<>''"
xmlDOM.cls line 2963 "self~parseAttributes(self~removeIgnorableWhiteSpace(attributes))"
xmlDOM.cls line 2976 "self~parseAttributes(self~removeIgnorableWhiteSpace(attributes))"

xmlParser::method resolveEntities private

Transforms (the standard) entities to their character representation.

NOTE - As DOCTYPE is not supported (yet) no DOCTYPE defined entities are handled.

Parameters
text - A string possibly with entities.
Returns
text - The string with entities resolved if any.

Definition at line 3020 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2938 "self~domBuilder~haveText(self~resolveEntities(text))"
xmlDOM.cls line 3002 "self~domBuilder~valueAttr(self~resolveEntities(attrValue))"


Get RexxLiterate at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on 30 Jul 2015 13:57:00 for xmlDOM for OOrexx by rexxliterate  0.0.1