The XmlNodeReader class is meant to be an easy interface for
getting data out of XML. Internally it uses a NotesDomParser to
process the XML and steps through the DOM tree to read nodes and
attributes.
Please see the lsdoc_description sub for usage details and
examples, or better yet, download LotusScript.doc from
http://www.lsdoc.org
and generate some documentation!
Property Summary | |
Boolean |
isEmpty (Get) Returns True if this object does not contain a base node reference or if the base node's isNull property is True, or False otherwise. |
NotesDOMNode |
thisNode (Get) Returns the NotesDomNode that this object uses as its base node. |
String |
thisNodeName (Get) Returns the name of the node used as this object's base node. |
Methods Summary | |
Public |
New() Creates a new, empty XmlNodeReader. |
Functions Summary | |
NotesDOMNode |
findChildNode(node As
NotesDOMNode, childName As String, count As Integer) Returns the nth child node with a specific name, that is directly beneath the given node. |
NotesDOMNode |
findFirstChildNode(node
As NotesDOMNode, childName As String) Returns the first child node with a specific name, that is directly beneath the given node. |
Public String |
get(nodePath As String) Returns the text of the FIRST node or attribute that matches this node path, if any. |
Public Variant |
getAll(nodePath As
String) Returns a string array containing the text of ALL nodes or attributes that match this node path, if any. |
Public Variant |
getAttributeNames(nodePath As
String) Returns a string array containing the name of all attributes for the node that matches this node path, if any. |
String |
getAttributeText(node As
NotesDOMNode, attrName As String) Returns the text of the given attribute. |
Public String |
getLastError() Returns the last error string that was generated internal to this class. |
Public NotesDOMNode |
getNode(nodePath As
String) Returns the FIRST node that matches this node path as a NotesDomNode. |
XmlNodeReader |
getNodeReader(nodePath As
String) Returns the FIRST node that matches this node path as an XmlNodeReader. |
Variant |
getNodeReaders(nodePath As
String) Returns ALL nodes that match this node path as an array of XmlNodeReader. |
Public Variant |
getNodes(nodePath As
String) Returns ALL nodes that match this node path as an array of NotesDomNode. |
String |
getNodeText(node As
NotesDOMNode) Returns the text of the given node. |
Public Variant |
getSubNodeNames(nodePath
As String) Returns a string array containing the name of all child nodes (only direct children, not grandchildren or great-grandchildren or below) of the node that matches this node path, if any. |
Private NotesDOMNode |
GetNodeFromPathArray(parent As
NotesDOMNode, nparr As Variant) Internal function to get the node described by a node path array, based on the given parent node. |
Public XmlNodeReader |
ReadFile(fileName As
String) Reads a text file of XML data in to this object for parsing. |
Public XmlNodeReader |
ReadNode(n As
NotesDOMNode) Reads a NotesDomNode in to this object for parsing. |
Public XmlNodeReader |
ReadStream(s As
NotesStream) Reads a NotesStream of XML data in to this object for parsing. |
Public XmlNodeReader |
ReadText(txt As
String) Reads a string of XML data in to this object for parsing. |
Private String |
setLastError(msg As String,
error_num As Integer) Internal method used to set the private lastError string. |
Method Detail |
Public New()
Function Detail |
Function findChildNode(node As NotesDOMNode, childName As String, count As Integer) As NotesDOMNode
Function findFirstChildNode(node As NotesDOMNode, childName As String) As NotesDOMNode
Public Function get(nodePath As String) As String
Public Function getAll(nodePath As String) As Variant
Public Function getAttributeNames(nodePath As String) As Variant
Function getAttributeText(node As NotesDOMNode, attrName As String) As String
Public Function getLastError() As String
Public Function getNode(nodePath As String) As NotesDOMNode
Function getNodeReader(nodePath As String) As XmlNodeReader
Function getNodeReaders(nodePath As String) As Variant
Public Function getNodes(nodePath As String) As Variant
Function getNodeText(node As NotesDOMNode) As String
Public Function getSubNodeNames(nodePath As String) As Variant
Private Function GetNodeFromPathArray(parent As NotesDOMNode, nparr As Variant) As NotesDOMNode
Public Function ReadFile(fileName As String) As XmlNodeReader
Public Function ReadNode(n As NotesDOMNode) As XmlNodeReader
Public Function ReadStream(s As NotesStream) As XmlNodeReader
Public Function ReadText(txt As String) As XmlNodeReader
Private Function setLastError(msg As String, error_num As Integer) As String