::class dom1Builder public

CLASS: domBuilder



Definition at line 2706 of xmlDOM.cls

Public Methods

  endDocument ()
  endElement (tagName)
  haveCDATA (cdata)
  haveComment (comment)
  havePI (target, data)
  haveText (text)
  init ()
  nameAttr (attrName)
  startDocument (content=.nil)
  startElement (tagName)
  valueAttr (attrValue)

Public Attributes

  doc

Private Attributes

  attrNode
  doc
no comment
  dom
  haveDocumentElement
  nodeStack

Instantiated by

tryxmldom.rex line 16

Feature Detail

dom1Builder::attribute dom private

The DOM (Level 1) implementation for building a DOM (Level 1)

NOTE - The domImplementation is currently only used for it's createDocument method.

Definition at line 2712 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2739 "self~dom = .xmlDomImplementation~new"
xmlDOM.cls line 2750 "self~doc = self~dom~createDocument()"

dom1Builder::attribute doc get

The DOM document resulting from the XML Parser and DOM (Level 1) builder.

Definition at line 2716 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2750 "self~doc = self~dom~createDocument()"
xmlDOM.cls line 2751 "self~nodeStack~push(self~doc)"
xmlDOM.cls line 2774 "elementNode = self~doc~createElement(tagName)"
xmlDOM.cls line 2776 "self~doc~documentElement = elementNode"
xmlDOM.cls line 2805 "self~attrNode = self~doc~createAttribute(attrName)"
xmlDOM.cls line 2828 "piNode = self~doc~createProcessingInstruction(target,data)"
xmlDOM.cls line 2840 "cmtNode = self~doc~createComment(comment)"
xmlDOM.cls line 2851 "txtNode = self~doc~createTextNode(text)"
xmlDOM.cls line 2862 "cdataNode = self~doc~createCDATASection(cdata)"
xmlDOM.cls line 2981 "return self~domBuilder~doc"

dom1Builder::attribute doc set private
Definition at line 2717 of xmlDOM.cls

dom1Builder::attribute nodeStack private

The stack of nested elements with childnodes.

NOTE - nodeStack[1] represents the current active Element node.

Definition at line 2723 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2740 "self~nodeStack = .queue~new"
xmlDOM.cls line 2751 "self~nodeStack~push(self~doc)"
xmlDOM.cls line 2760 "if self~nodeStack~items<>1 "
xmlDOM.cls line 2763 "docNode = self~nodeStack~pull"
xmlDOM.cls line 2779 "self~nodeStack[1]~appendChild(elementNode)"
xmlDOM.cls line 2780 "self~nodeStack~push(elementNode)"
xmlDOM.cls line 2791 "if self~nodeStack[1]~tagName<>tagName "
xmlDOM.cls line 2795 "processedNode = self~nodeStack~pull"
xmlDOM.cls line 2816 "self~attrNode~ownerElement = self~nodeStack[1]"
xmlDOM.cls line 2817 "self~nodeStack[1]~setAttributeNode(self~attrNode)"
xmlDOM.cls line 2829 "self~nodeStack[1]~appendChild(piNode)"
xmlDOM.cls line 2841 "self~nodeStack[1]~appendChild(cmtNode)"
xmlDOM.cls line 2852 "self~nodeStack[1]~appendChild(txtNode)"
xmlDOM.cls line 2863 "self~nodeStack[1]~appendChild(cdataNode)"

dom1Builder::attribute attrNode private

Represents the current active Attr node

Definition at line 2727 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2805 "self~attrNode = self~doc~createAttribute(attrName)"
xmlDOM.cls line 2815 "self~attrNode~nodeValue = attrValue"
xmlDOM.cls line 2816 "self~attrNode~ownerElement = self~nodeStack[1]"
xmlDOM.cls line 2817 "self~nodeStack[1]~setAttributeNode(self~attrNode)"

dom1Builder::attribute haveDocumentElement private

Flag to indicate if the convenience attribute documentElement must be set or not.

Definition at line 2731 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2741 "self~haveDocumentElement = .false"
xmlDOM.cls line 2775 "if (self~haveDocumentElement==.false) "
xmlDOM.cls line 2777 "self~haveDocumentElement = .true"

dom1Builder::method init

DOM Builder instance constructor

NOTE - domImplementation was introduced in DOM Level2, it is used here only to create a document with no
namespace and doctype.


Definition at line 2738 of xmlDOM.cls

dom1Builder::method startDocument

The method invoker wants to start a new DOM document. A DOM Level1 document is created with the help of the DOM Level2
DomImplemetation interface.

Parameters
content=.nil - Currently ignored, if present

Definition at line 2748 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2917 "self~domBuilder~startDocument"

dom1Builder::method endDocument

Signals the end of DOM building process. At this stage the stack with active nodes should only have the document node
as content.


Definition at line 2757 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2980 "self~domBuilder~endDocument"

dom1Builder::method startElement

Start a new element node.

If this is the first element created, the convenience attribute documentElement is set. The new element node is
made the currently active one after being appended as a childnode of the parentnode.

Parameters
tagName - the name of the tag for this element node.

Definition at line 2772 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2961 "self~domBuilder~startElement(tagName)"
xmlDOM.cls line 2974 "self~domBuilder~startElement(tagName)"

dom1Builder::method endElement

Finish the currently active element node.

The previous elemnt node is made the active node, by removing this active node from the stack.

Parameters
tagName - the name of the tag of the element being ended.
Raises
syntax 93.900 - Mismatch in start and ending tag.

Definition at line 2789 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2964 "self~domBuilder~endElement(tagName)"
xmlDOM.cls line 2969 "self~domBuilder~endElement(tagName)"

dom1Builder::method nameAttr

Handle an attribute's name

This will create the Attr node for the attribute, no name space checking is done.

Parameters
attrName - the name part of the current element's attribute.

Definition at line 2803 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 3001 "self~domBuilder~nameAttr(attrName)"

dom1Builder::method valueAttr

Handle an attibute's value.

Appends this Attr node to the (perhaps empty) list of attributes. Also sets the Attr's node ownerelement.

Parameters
attrValue - the value part of the current element's attribute.

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

dom1Builder::method havePI

Handle a Processing Instruction (PI).

The PInode is appended as a childnode for the currently active element node.

Parameters
target - The target for the PI (e.g. 'xml' in '<?xml version=.......?>'.
data - The information following the target as a string.

Definition at line 2826 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2951 "self~domBuilder~havePI(target, data)"

dom1Builder::method haveComment

Handle a Comment.

No validity checking is done on the comment's content. The comment node is appended as a childnode for the active
element node.

Parameters
comment - The string representing the comment

Definition at line 2838 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2946 "self~domBuilder~haveComment(comment)"

dom1Builder::method haveText

Handle a Text node.

The text node is appended as a childnode for the active element node.

Parameters
text - the (inner) text of the node with entities resolved.

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

dom1Builder::method haveCDATA

Handle CDATA.

The CDATA node is appended as a childnode for the currently active element node

Parameters
cdata - The raw (unparsed) text for the CDATASection node.

Definition at line 2860 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 2956 "self~domBuilder~haveCDATA(rawText)"


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