Mixin for nodes.
First the declaration of functions that have no object references.
- HandleAppendNode(Handle hoNode)
Append Node to the end of list. Returns passed Object handle if Ok, 0 if error
- IntegerhoNewTextNode
- IntegerhinfcNode
- IntegerinfcReturned
- HandleInsertBeforeNode(Integer hoNewNode Integer hoNode)
Insert NewNode before Node. Returns passed newnode Object handle if Ok, 0 if error
- IntegerhinfcNewNode
- IntegerhinfcNode
- IntegeriType
- IntegerhoRefNode
- IntegerinfcReturned
- HandleRemoveNode(Integer hoNode)
Remove Node. Returns object Id of removed node, zero if error
Important: The node is not destroyed! This lets you move it elsewhere if you want
- IntegerhInfcNode
- HandleReplaceNode(Integer hoNewNode Integer hoNodeToReplace)
Replace Node. Returns object Id of replaced node, zero if error
Important: The replaced node is not destroyed! This lets you move it elsewhere if you want
- IntegerhInfcNewNode
- IntegerhinfcNodetoReplace
- IntegerhinfcNode
- HandleRemoveNamedNode(String sQueryString)
Remove the named node. Returns handle to removed node. You must destroy
or move this removed object as needed
- IntegerhoNode
- IntegerhInfcTemplate
- IntegerhinfcNode
- HandleCloneNode(Integer bRecurse)
This function creates a clone of the passed Node. if bRecurse all child nodes are also
cloned. The object Id of the new clone object is returned.
The interface of the object returned can be used in AppendChild to add
the node to the XML Document.
- IntegerhoNewNode
- IntegerhinfcNewNode
- HandleChildNodes()
Create a collection of all nodes. returns handle of a cXMLDomNodeList
- IntegerinfcNodeList
- IntegerhoNodeList
- HandleAttributeNodes()
Create a collection of all attributes. returns handle of a cXMLDomNodeMapList
- IntegerhoCollectionId
- IntegerhinfcAttributes
- HandleTempAttributeNodes()
Create a collection of all attributes for the temporary attribute node object.
Using this saves a small amount of time creating and destroying this object but
it must be used with care. This binding is temporary!
- IntegerhoCollectionId
- IntegerhoDocument
- IntegerhinfcAttributes
- HandleElementNodes(String sQueryString)
Returns a collection of just elements
- IntegerhoNodeList
- IntegerhinfcNodeList
- HandleFindNode(String sQueryString)
Return object handle for query.
- IntegerhoNode
- IntegerhinfcNode
- HandleFindNodeList(String sQueryString)
Return object handle for a collection node.
- IntegerhoNodeList
- IntegerhinfcNodeList
- HandleCreateElementNode(String sTagName String sValue)
The CreatexxxxxNode messages creates an node object for the type specified. Both
the interface and the object or of the correct type (i.e. element, comment)
These all return an object handle which can be used to place the object via
appendNode or InsertBeforeNode
This function creates a child element, returning a dataflex object.
The interface of the object returned can be used in AppendChild to add
the element to the XML Document.
- IntegerhoNewElement
- IntegerhoDocumentObject
- IntegerinfcNewElement
- IntegeriClassId
- HandleCreateAttributeNode(String sName String sValue)
This function creates an attribute in a document. Attributes are _NOT_ children of an element.
A DataFlex object is returned. An attribute can be added to an xml document using
get AddAttributeNode.
- IntegerhoNewAttribute
- IntegerhoDocumentObject
- IntegerinfcNewAttribute
- IntegeriClassId
- HandleCreateChildComment(String sValue)
This function creates a child comment, returning a dataflex object.
The interface of the object returned can be used in AppendChild to add
the comment to the XML Document.
- IntegerhoNewComment
- IntegerhoDocumentObject
- IntegerinfcNewComment
- IntegeriClassID
- HandleCreateChildProcessingInstruction(String sTarget String sValue)
This function creates a child processing instruction, returning a dataflex object.
The interface of the object returned can be used in AppendChild to add
the processing instruction to the XML Document.
- IntegerhoNewProcessingInstruction
- IntegerhoDocumentObject
- IntegerinfcNewProcessingInstruction
- IntegeriClassID
- HandleCreateChildTextNode(String sValue)
This function creates a child text node, returning a dataflex object.
The interface of the object returned can be used in AppendChild to add
the text node to the XML Document.
- IntegerhoNewTextNode
- IntegerhoDocumentObject
- IntegerinfcNewTextNode
- IntegeriClassID
- HandleCreateCDATASectionNode(String sValue)
This function creates a cdata text node, returning a dataflex object.
The interface of the object returned can be used in AppendChild to add
the cdata node to the XML Document.
- IntegerhoNewNode
- IntegerhoDocumentObject
- IntegerinfcNewNode
- IntegeriClassId
- HandleCreateDocumentFragmentNode()
Create a document fragment. Document fragments can be used to house nodes temporarily. When
You append or insert a document fragment (appendNode InsertBeforeNode) child nodes are appended
to the destination object and not the fragment node itself. This is useful!
- IntegerhoNew
- IntegerhoDocumentObject
- IntegerinfcNew
- IntegeriClassID
- HandleCreateChildNode(Integer iNodeType String sTagName String sNameSpace)
Create a Node of any passed Type (e.g. Node_element). Normally you don't need this as there are
specific messages to do this for each node type. Node that this lets you pass namespaces as a separate
parameter. With all of the other messages (e.g. createElementNode) you pass namespaces as prefixed to
the tagname (e.g. Get CreateElementNode "MyNameSpace:MyTag" "MyValue" to hoEle)
- IntegerhoNewNode
- IntegerhoDocumentObject
- IntegerinfcNewNode
- IntegeriClassid
- IntegeriType
- HandleAddElement(String sTagName String sValue)
The Addxxxxx messages create a new node and appends it to the list. When used as a function,
the object handle is returned and must be disposed of later by the programmer.
When used as a procedure, the object is destroyed--it just does it and is done.
- IntegerhoNewElement
- AddElement(String sTagName String sValue)
- IntegerhoNewElement
- HandleCreateElementNodeNS(String sNameSpace String sTagName String sValue)
this returns the object, This is often needed
- IntegerhoNewElement
- HandleAddElementNS(String sNameSpace String sTagName String sValue)
this returns the object, This is often needed
- IntegerhoNewElement
- AddElementNS(String sNameSpace String sTagName String sValue)
- IntegerhoNewElement
- HandleAddAttributeNode(Handle hoNode)
- IntegerhInfc
- HandleAttributeValueNode(String sName)
// is this needed
Function AddAttributeNodeNS handle hoNode returns Handle
Get AddAttributeNode hoNode to hoNode
function_return hoNode
End_Function
- IntegerhInfc
- IntegerhoNode
- HandleAttributeValueNodeNS(String sNameSpace String sBaseName)
- IntegerhoAttrs
- IntegerhoAttr
- StringsValue
- HandleCreateAttributeNodeNS(String sNameSpace String sName String sValue)
- IntegerhoNewAttribute
- AddAttributeNS(String sNameSpace String sName String sValue)
- IntegerhoNode
- AddAttribute(String sName String sValue)
This function encapsulates creation and addition of attributes to a node.
should only work with element class
- AddChildComment(String sValue)
This function encapsulates creation and addition of comments to a node.
The return value is a Boolean that is currently unused.
- IntegerhoNewNode
- AddChildProcessingInstruction(String sTarget String sValue)
This function encapsulates creation and addition of processing instructions to a node.
The return value is a Boolean that is currently unused.
- IntegerhoNewNode
- AddChildTextNode(String sValue)
This function encapsulates creation and addition of text nodes to a node.
The return value is a Boolean that is currently unused.
- IntegerhoNewNode
- AddCDataSection(String sValue)
This procedure encapsulates creation and addition of cdata text nodes to a node.
- IntegerhoNewNode
- HandleAddChildNode(Integer iNodeType String sTagName String sNameSpace)
- IntegerhoNewNode
- IntegerhoDocumentObject
- StringpsText()
don't use the runtime/msxml version of this. Instead just return the
first text from the first child node. This is much faster
- IntegerhText
- StringsValue
- StringAllChildNodesText()
Use this to call the internal Text property. This returns all text for all child
node. You rarely would want to do this. The is uses the msxml psText which can
get slow with very large files. If for some reason you need all of the child node's
text and the file is large, you might want to consider doing this process manually.
- StringsValue
- StringInfcNodeValue(Handle hInfc)
return the interface NodeValue without having to create a
new object
- IntegerhoDocument
- IntegerhoTempNode
- StringsValue
- StringChildNodeValue(String sTagName)
ChildNodeValue is used to get the "value" of an element. This is useful when the element
only has a single value (similar to an attribute).
- IntegerhoTempNode
- IntegerhoDocument
- IntegerhinfcTempNode
- StringsRetVal
- SetChildNodeValue(String sTagName String sValue)
This simple function allows a parent to change the text of one of its elements.
This actually occurs quite a bit, because (as stated above) lowest level
elements are frequently used as properties.
- IntegerhoTempNode
- IntegerhinfcTempNode
- HandleFirstChild()
These messages are used to allow you to travese through a nodes.
- IntegerhoChild
- IntegerhinfcChild
- HandleNextSibling()
- IntegerhoChild
- IntegerhinfcChild
- HandlePreviousSibling()
- IntegerhoChild
- IntegerhinfcChild
- HandleLastChild()
- IntegerhoChild
- IntegerhinfcChild
- HandleParentNode()
return an object that is the parent of the current node
- IntegerhoId
- IntegerhinfcXMLInterface
- HandleNextNode()
Same as NextSibling except it uses or destroys the current node
optimized version does not destroy/create object unless it needs to.
if the next node is the same node type we will resuse this object
else this object is destroyed
- IntegerhoNode
- IntegerhoDocument
- IntegerhInfc
- EnumerateNodes(Integer iMsg Integer hoReceiver String sVal1 String sVal2)
Enumerate through all nodes.
- Integeri
- IntegeriLen
- IntegerhoNode
- IntegerhoNodeCollection
- EnumerateElements(Integer iMsg Integer hoReceiver String sVal1 String sVal2)
Enumerate through all elements.
- Integeri
- IntegeriLen
- IntegerhoNode
- IntegerhoNodeCollection
- EnumerateAttributes(Integer iMsg Integer hoReceiver String sSomeValue)
enumerate through all attributes. There is no recurse here because attributes will not
contain attributes.
- Integeri
- IntegeriLen
- IntegerhoNode
- IntegerhoNodeMapCollection
- StringXSLTransformation(Integer hoXSLDocument)
- IntegerinfcXSLStartAt
- StringsBuffer
- AddressXSLTransformationToAddress(Integer hoXSLDocument)
This allows for transformations not limited to the size of the string buffer
Note that it is up to the programmer to dispose of the memory allocated at pBuffer
by using the free(pBuffer) function
- IntegerinfcXSLStartAt
- AddresspBuffer
- StringBaseNameFromQName(String sName)
extract base name from string. e.g.: ns:name --> name
- IntegeriPos
- StringPrefixNameFromQName(String sName)
extract prefix name from string. e.g.: ns:name --> ns
- StringsPreFix
- IntegeriPos
- BooleanIsElementNS(String sNamespaceURI String sBaseName)
Returns true if node is element and namespace and base name match
- HandleChildElementNS(String sNameSpaceURI String sBaseName)
Returns node of first occurence of child node matching namespace and base name
- IntegerhoNode
- HandleNextElementNS(String sNameSpaceURI String sBaseName)
Returns node of next occurence of sibling node matching namespace and base name
and destroys the current node.
Function NextElementNS String sNameSpaceURI String sBaseName Returns Handle
handle hoNode
Get NextSibling to hoNode
While (hoNode and not(IsElementNS(hoNode, sNameSpaceURI, sBaseName)))
Get NextNode of hoNode to hoNode
end
Send Destroy
function_return hoNode
end_function
- IntegerhoNode
- StringChildElementValueNS(String sNameSpaceURI String sBaseName)
Returns value (string) first occurence of child node matching namespace and base name
- IntegerhoNext
- StringsText
- SetChildElementValueNS(String sNameSpaceURI String sBaseName String sValue)
- IntegerhoNode
- IntegerhinfcTempNode
- StringPrefixToNamespaceURI(String sPrefix)
// Returns node of first occurence of child node matching namespace and base name
// that has an attrib value that contains a specified value
//
Function FindElementNodeWithAttribNS string sNamespace string sBaseName string sAttribName string sAttribValue returns handle
handle hoNext hoNode
string sName
Get FirstChild to hoNode
While (hoNode)
If (IsElementNS(hoNode, sNameSpace, sBaseName)) begin
Get AttributeValue of hoNode sAttribName to sName
If (sName=sAttribValue) Begin
Function_return hoNode
end
end
Get NextSibling of hoNode to hoNext
Send Destroy of hoNode
Move hoNext to hoNode
end
function_return 0
end_function
pass a prefix and try to finds its NameSpaceURI. Start at current node and work up to parent.
This can be useful when a qualified name is found in an attribute value
- IntegerhoNode
- Integeri
- IntegeriNodes
- IntegerhoNodes
- IntegerhoParentNode
- IntegerhoAttNode
- BooleanbDone
- BooleanbParent
- StringsAttPrefix
- StringsName
- StringsNameSpace