Xml ActiveX Reference Documentation

Xml

A free non-validating XML parser component with encryption and compression features.

Object Creation

(Visual Basic 6.0)
Dim obj As New ChilkatXml

(ASP)
set obj = Server.CreateObject("Chilkat_9_5_0.Xml")

(VBScript)
set obj = CreateObject("Chilkat_9_5_0.Xml")

(Delphi)
obj := TChilkatXml.Create(Self);

(FoxPro)
loObject = CreateObject('Chilkat_9_5_0.Xml')

(PowerBuilder)
lole_object = create oleobject
li_rc = lole_object.ConnectToNewObject("Chilkat_9_5_0.Xml")

(SQL Server)
EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Xml', @obj OUT

(Javascript)
var obj = new ActiveXObject("Chilkat_9_5_0.Xml");

Properties

Cdata As Long

When True, causes an XML node's content to be encapsulated in a CDATA section.

(Classic ASP) Using CDATA in XML

(Visual FoxPro) Using CDATA in XML

(PowerBuilder) Using CDATA in XML

(SQL Server) Using CDATA in XML

(Visual Basic 6.0) Using CDATA in XML

(VBScript) Using CDATA in XML

Content As String

The content of the XML node. It is the text between the open and close tags, not including child nodes. For example:

<tag1>This is the content</tag1>

<tag2><child1>abc</child1><child2>abc</child2>This is the content</tag2>
Because the child nodes are not included, the content of "tag1" and "tag2" are both equal to "This is the content".

Content vs. Children: A common misconception explained.

(Classic ASP) Setting XML Tag and Content

(Visual FoxPro) Setting XML Tag and Content

(PowerBuilder) Setting XML Tag and Content

(SQL Server) Setting XML Tag and Content

(Visual Basic 6.0) Setting XML Tag and Content

(VBScript) Setting XML Tag and Content

ContentInt As Long

Set/get the content as an integer.

DebugLogFilePath As String

If set to a file path, causes each Chilkat method or property call to automatically append it's LastErrorText to the specified log file. The information is appended such that if a hang or crash occurs, it is possible to see the context in which the problem occurred, as well as a history of all Chilkat calls up to the point of the problem. The VerboseLogging property can be set to provide more detailed information.

This property is typically used for debugging the rare cases where a Chilkat method call hangs or generates an exception that halts program execution (i.e. crashes). A hang or crash should generally never happen. The typical causes of a hang are:

  1. a timeout related property was set to 0 to explicitly indicate that an infinite timeout is desired,
  2. the hang is actually a hang within an event callback (i.e. it is a hang within the application code), or
  3. there is an internal problem (bug) in the Chilkat code that causes the hang.

DocType As String

The DOCTYPE declaration (if any) for the XML document.

(Classic ASP) Setting the XML DOCTYPE

(Visual FoxPro) Setting the XML DOCTYPE

(PowerBuilder) Setting the XML DOCTYPE

(SQL Server) Setting the XML DOCTYPE

(Visual Basic 6.0) Setting the XML DOCTYPE

(VBScript) Setting the XML DOCTYPE

EmitBom As Long

Introduced in version 9.5.0.44

If 1, then emit the BOM (byte order mark, also known as a preamble) for encodings such as utf-8, utf-16, etc. The defautl value is 0. This only applies when writing XML files. It does not apply when getting the XML as a string via the GetXml method.

EmitCompact As Long

Introduced in version 9.5.0.64

If 1, then GetXml and GetXmlSb emit compact XML. The XML emitted has no unnecessary whitespace, incuding no end-of-lines (CR's and/or LF's). The default value is 0, which maintains backward compatibility.

(Classic ASP) XML EmitCompact

(Visual FoxPro) XML EmitCompact

(PowerBuilder) XML EmitCompact

(SQL Server) XML EmitCompact

(Visual Basic 6.0) XML EmitCompact

(VBScript) XML EmitCompact

EmitXmlDecl As Long

If 1, then the XML declaration is emitted for methods (such as GetXml or SaveXml) where the XML is written to a file or string. The default value of this property is 1. If set to 0, the XML declaration is not emitted. (The XML declaration is the 1st line of an XML document starting with "<?xml ...".

Encoding As String

This is the encoding attribute in the XML declaration, such as "utf-8" or "iso-8859-1". The default is "utf-8". This property can be set from any node in the XML document and when set, causes the encoding property to be added to the XML declaration. Setting this property does not cause the document to be converted to a different encoding.

Calling any of the LoadXml* methods causes this property to be set to the charset found within the XML, if any. If no charset is specified within the loaded XML, then the LoadXml method resets this property to its default value of "utf-8".

I As Long

Introduced in version 9.5.0.64

Used in tagPaths (and ChilkatPath). The value of this property is substituted for "i" in "[i]". See the example below..

(Classic ASP) Demonstrate the XML "I" Property

(Visual FoxPro) Demonstrate the XML "I" Property

(PowerBuilder) Demonstrate the XML "I" Property

(SQL Server) Demonstrate the XML "I" Property

(Visual Basic 6.0) Demonstrate the XML "I" Property

(VBScript) Demonstrate the XML "I" Property

(Classic ASP) Demonstrate the XML I, J, and K Properties

(Visual FoxPro) Demonstrate the XML I, J, and K Properties

(PowerBuilder) Demonstrate the XML I, J, and K Properties

(SQL Server) Demonstrate the XML I, J, and K Properties

(Visual Basic 6.0) Demonstrate the XML I, J, and K Properties

(VBScript) Demonstrate the XML I, J, and K Properties

J As Long

Introduced in version 9.5.0.64

Used in tagPaths (and ChilkatPath). The value of this property is substituted for "j" in "[j]". See the example below..

(Classic ASP) Demonstrate the XML I, J, and K Properties

(Visual FoxPro) Demonstrate the XML I, J, and K Properties

(PowerBuilder) Demonstrate the XML I, J, and K Properties

(SQL Server) Demonstrate the XML I, J, and K Properties

(Visual Basic 6.0) Demonstrate the XML I, J, and K Properties

(VBScript) Demonstrate the XML I, J, and K Properties

K As Long

Introduced in version 9.5.0.64

Used in tagPaths (and ChilkatPath). The value of this property is substituted for "k" in "[k]". See the example below..

LastBinaryResult As Variant (read-only)

Introduced in version 9.5.0.52

The binary data returned by the last (binary data returning) method called. Only available if Chilkat.Global.KeepBinaryResult is set to 1. This provides a means for obtaining large varbinary results in the SQL Server environment (where limitations exist in getting large amounts of data returned by method calls, but where temp tables can be used for binary properties).

LastErrorHtml As String (read-only)

Provides information in HTML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

LastErrorText As String (read-only)

Provides information in plain-text format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

Concept of LastErrorText

LastErrorText Standard Information

LastErrorXml As String (read-only)

Provides information in XML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

LastMethodSuccess As Long

Introduced in version 9.5.0.52

Indicate whether the last method call succeeded or failed. A value of 1 indicates success, a value of 0 indicates failure. This property is automatically set for method calls. It is not modified by property accesses. The property is automatically set to indicate success for the following types of method calls:

  • Any method that returns a string.
  • Any method returning a Chilkat object, binary bytes, or a date/time.
  • Any method returning a standard boolean status value where success = 1 and failure = 0.
  • Any method returning an integer where failure is defined by a return value less than zero.

Note: Methods that do not fit the above requirements will always set this property equal to 1. For example, a method that returns no value (such as a "void" in C++) will technically always succeed.

LastStringResult As String (read-only)

Introduced in version 9.5.0.52

The string return value of the last (string returning) method called. Only available if Chilkat.Global.KeepStringResult is set to 1. This provides a means for obtaining large string results in the SQL Server environment (where limitations exist in getting long strings returned by method calls, but where temp tables can be used for string properties).

Long Strings Returned by ActiveX Methods in SQL Server

LastStringResultLen As Long (read-only)

Introduced in version 9.5.0.53

The length, in characters, of the string contained in the LastStringResult property.

NumAttributes As Long (read-only)

The number of attributes. For example, the following node has 2 attributes:

<tag attr1="value1" attr2="value2"> This is the content</tag>

(Classic ASP) Methods for Getting Attributes

(Visual FoxPro) Methods for Getting Attributes

(PowerBuilder) Methods for Getting Attributes

(SQL Server) Methods for Getting Attributes

(Visual Basic 6.0) Methods for Getting Attributes

(VBScript) Methods for Getting Attributes

NumChildren As Long (read-only)

The number of direct child nodes contained under this XML node.

SortCaseInsensitive As Long

If true (or 1 for ActiveX), then all Sort* methods use case insensitive sorting.

Standalone As Long

This is the standalone attribute in the XML declaration. This property can be set from any node in the XML document. A value of 1 adds a standalone="yes" to the XML declaration:

<?xml ... standalone="yes">

Tag As String

The XML node's tag.

(Classic ASP) Setting XML Tag and Content

(Visual FoxPro) Setting XML Tag and Content

(PowerBuilder) Setting XML Tag and Content

(SQL Server) Setting XML Tag and Content

(Visual Basic 6.0) Setting XML Tag and Content

(VBScript) Setting XML Tag and Content

TreeId As Long (read-only)

Each tree (or XML document) has a unique TreeId. This is the ID of the tree, and can be used to determine if two Xml objects belong to the same tree.

VerboseLogging As Long

If set to 1, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is 0. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

Version As String (read-only)

Version of the component/library, such as "9.5.0.63"

Methods

AccumulateTagContent(tag As String, skipTags As String) As String

Accumulates the content of all nodes having a specific tag into a single result string. SkipTags specifies a set of subtrees to be avoided. The skipTags are formatted as a string of tags delimited by vertical bar characters. All nodes in sub-trees rooted with a tag appearing in skipTags are not included in the result.

Returns Nothing on failure

(Classic ASP) XML Accumulate Tag Content

(Visual FoxPro) XML Accumulate Tag Content

(PowerBuilder) XML Accumulate Tag Content

(SQL Server) XML Accumulate Tag Content

(Visual Basic 6.0) XML Accumulate Tag Content

(VBScript) XML Accumulate Tag Content

AddAttribute(name As String, value As String) As Long

Adds an attribute to the calling node in the XML document. Returns True for success, and False for failure.

Returns 1 for success, 0 for failure.

(Classic ASP) Adding Attributes to an XML Node

(Visual FoxPro) Adding Attributes to an XML Node

(PowerBuilder) Adding Attributes to an XML Node

(SQL Server) Adding Attributes to an XML Node

(Visual Basic 6.0) Adding Attributes to an XML Node

(VBScript) Adding Attributes to an XML Node

(Classic ASP) AddAttribute - Insert New Attribute in XML Node

(Visual FoxPro) AddAttribute - Insert New Attribute in XML Node

(PowerBuilder) AddAttribute - Insert New Attribute in XML Node

(SQL Server) AddAttribute - Insert New Attribute in XML Node

(Visual Basic 6.0) AddAttribute - Insert New Attribute in XML Node

(VBScript) AddAttribute - Insert New Attribute in XML Node

AddAttributeInt(name As String, ByVal value As Long) As Long

Adds an integer attribute to a node.

Returns 1 for success, 0 for failure.

AddChildTree(tree As ChilkatXml) As Long

Adds an entire subtree as a child. If the child was a subtree within another Xml document then the subtree is effectively transferred from one XML document to another.

Returns 1 for success, 0 for failure.

AddOrUpdateAttribute(name As String, value As String)

Adds an attribute to an XML node. If an attribute having the specified name already exists, the value is updated.

(Classic ASP) Update an XML Attribute

(Visual FoxPro) Update an XML Attribute

(PowerBuilder) Update an XML Attribute

(SQL Server) Update an XML Attribute

(Visual Basic 6.0) Update an XML Attribute

(VBScript) Update an XML Attribute

AddOrUpdateAttributeI(name As String, ByVal value As Long)

Adds an integer attribute to an XML node. If an attribute having the specified name already exists, the value is updated.

AddStyleSheet(styleSheet As String)

Adds a style sheet declaration to the XML document. The styleSheet should be a string such as:

<?xml-stylesheet href="mystyle.css" title="Compact" type="text/css"?>

AddToAttribute(name As String, ByVal amount As Long)

Adds an integer amount to an integer attribute's value. If the attribute does not yet exist, this method behaves the same as AddOrUpdateAttributeI.

(Classic ASP) Update an XML Attribute

(Visual FoxPro) Update an XML Attribute

(PowerBuilder) Update an XML Attribute

(SQL Server) Update an XML Attribute

(Visual Basic 6.0) Update an XML Attribute

(VBScript) Update an XML Attribute

AddToChildContent(tag As String, ByVal amount As Long)

Adds an integer value to the content of a child node.

AddToContent(ByVal amount As Long)

Adds an integer amount to the node's content.

AppendToContent(str As String) As Long

Appends text to the content of an XML node

Returns 1 for success, 0 for failure.

BEncodeContent(charset As String, inData As Variant) As Long

Sets the node's content with 8bit data that is in a specified multibyte character encoding such as utf-8, shift-jis, big5, etc. The data is first B-encoded and the content is set to be the B-encoded string. For example, if called with "Big5"for the charset, you would get a string that looks something like this: "=?Big5?B?pHCtsw==?=". The data is Base64-encoded and stored between the last pair of "?" delimiters. Use the DecodeContent method to retrieve the byte data from a B encoded string.

Returns 1 for success, 0 for failure.

ChildContentMatches(tagPath As String, pattern As String, ByVal caseSensitive As Long) As Long

Return 1 if a child at the specified tagPath contains content that matches a wildcarded pattern. Otherwise returns 0.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

ChilkatPath(pathCmd As String) As String

Follows a series of commands to navigate through an XML document to return a piece of data or update the caller's reference to a new XML document node.

Note: This method not related to the XPath (XML Path) standard in any way.

The pathCmd is formatted as a series of commands separated by vertical bar characters, and terminated with a return-command:

    command|command|command|...|returnCommand

A command can be any of the following:

  1. TagName -- Navigate to the 1st direct child with the given tag.
  2. TagName[n] -- Navigate to the Nth direct child with the given tag.
  3. .. -- Navigate up to the parent
  4. TagName{Content} -- Navigate to the 1st direct child with the given tag having the exact content.
  5. /T/TagName -- Traverse the XML DOM tree (rooted at the caller) and navigate to the 1st node having the given tag.
  6. /C/TagName,ContentPattern -- Traverse the XML DOM tree (rooted at the caller) and navigate to the 1st node having the given tag with content that matches the ContentPattern. ContentPattern may use one or more asterisk ('*") characters to represent 0 or more of any character.
  7. /C/ContentPattern -- Traverse the XML DOM tree (rooted at the caller) and navigate to the 1st node having any tag with content that matches the ContentPattern. ContentPattern may use one or more asterisk ('*") characters to represent 0 or more of any character.
  8. /A/TagName,AttrName,AttrValuePattern -- Traverse the XML DOM tree (rooted at the caller) and navigate to the 1st node having the given tag, and attribute, with the attribute value that matches the AttrValuePattern. AttrValuePattern may use one or more asterisk ('*") characters to represent 0 or more of any character.
The returnCommand can be any of the following:
  1. * -- Return the Content of the node.
  2. (AttrName) -- Return the value of the given attribute.
  3. $ -- Update the caller's internal reference to be the node (arrived at by following the series of commands). Returns an empty string.

Returns Nothing on failure

(Classic ASP) ChilkatPath Sample Code

(Visual FoxPro) ChilkatPath Sample Code

(PowerBuilder) ChilkatPath Sample Code

(SQL Server) ChilkatPath Sample Code

(Visual Basic 6.0) ChilkatPath Sample Code

(VBScript) ChilkatPath Sample Code

(Classic ASP) Get XML Attribute Value by Path

(Visual FoxPro) Get XML Attribute Value by Path

(PowerBuilder) Get XML Attribute Value by Path

(SQL Server) Get XML Attribute Value by Path

(Visual Basic 6.0) Get XML Attribute Value by Path

(VBScript) Get XML Attribute Value by Path

Clear()

Removes all children, attributes, and content from the XML node. Resets the tag name to "unnamed".

ContentMatches(pattern As String, ByVal caseSensitive As Long) As Long

Return true if the node's content matches a wildcarded pattern.

Copy(node As ChilkatXml)

Copies the tag, content, and attributes to the calling node.

CopyRef(copyFromNode As ChilkatXml)

Discards the caller's current internal reference and copies the internal reference from copyFromNode. Effectively updates the caller node to point to the same node in the XML document as copyFromNode.

DecodeContent() As Variant

Decodes a node's Q or B-encoded content string and returns the byte data.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

DecodeEntities(str As String) As String

Utility method to decode HTML entities. It accepts a string containing (potentially) HTML entities and returns a string with the entities decoded.

Returns Nothing on failure

DecryptContent(password As String) As Long

Decrypts the content of an XML node that was previously 128-bit AES encrypted with the EncryptContent method.

Returns 1 for success, 0 for failure.

(Classic ASP) Encrypting and Decrypting Content

(Visual FoxPro) Encrypting and Decrypting Content

(PowerBuilder) Encrypting and Decrypting Content

(SQL Server) Encrypting and Decrypting Content

(Visual Basic 6.0) Encrypting and Decrypting Content

(VBScript) Encrypting and Decrypting Content

EncryptContent(password As String) As Long

Encrypts the content of the calling XML node using 128-bit CBC AES encryption. The base64-encoded encrypted content replaces the original content.

Returns 1 for success, 0 for failure.

(Classic ASP) Encrypting and Decrypting Content

(Visual FoxPro) Encrypting and Decrypting Content

(PowerBuilder) Encrypting and Decrypting Content

(SQL Server) Encrypting and Decrypting Content

(Visual Basic 6.0) Encrypting and Decrypting Content

(VBScript) Encrypting and Decrypting Content

ExtractChildByIndex(ByVal index As Long) As ChilkatXml

Removes and returns the Nth child of an XML node. The first child is at index 0.

Returns Nothing on failure

ExtractChildByName(tagPath As String, attrName As String, attrValue As String) As ChilkatXml

Removes and returns the first child node at the specified tag or tag path. The attrName and attrValue may be empty, in which case the first child matching the tag is removed and returned. If attrName is specified, then the first child having a tag equal to tagPath, and an attribute with attrName is returned. If attrValue is also specified, then only a child having a tag equal to tagPath, and an attribute named attrName, with a value equal to attrValue is returned.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns Nothing on failure

(Classic ASP) ExtractChildByName using a Tag Path

(Visual FoxPro) ExtractChildByName using a Tag Path

(PowerBuilder) ExtractChildByName using a Tag Path

(SQL Server) ExtractChildByName using a Tag Path

(Visual Basic 6.0) ExtractChildByName using a Tag Path

(VBScript) ExtractChildByName using a Tag Path

FindChild(tagPath As String) As ChilkatXml

Returns the child with the given tag or at the specified tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns Nothing on failure

(Classic ASP) Find Direct Child with Specific Tag

(Visual FoxPro) Find Direct Child with Specific Tag

(PowerBuilder) Find Direct Child with Specific Tag

(SQL Server) Find Direct Child with Specific Tag

(Visual Basic 6.0) Find Direct Child with Specific Tag

(VBScript) Find Direct Child with Specific Tag

(Classic ASP) Access SOAP Body XML

(Visual FoxPro) Access SOAP Body XML

(PowerBuilder) Access SOAP Body XML

(SQL Server) Access SOAP Body XML

(Visual Basic 6.0) Access SOAP Body XML

(VBScript) Access SOAP Body XML

FindChild2(tagPath As String) As Long

Updates the Xml object's internal reference to point to a child at the specified tag or tagPath.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns 1 for success, 0 for failure.

(Classic ASP) Find Direct Child with Specific Tag

(Visual FoxPro) Find Direct Child with Specific Tag

(PowerBuilder) Find Direct Child with Specific Tag

(SQL Server) Find Direct Child with Specific Tag

(Visual Basic 6.0) Find Direct Child with Specific Tag

(VBScript) Find Direct Child with Specific Tag

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

FindNextRecord(tagPath As String, contentPattern As String) As ChilkatXml

Returns the next record node where the child with a specific tag matches a wildcarded pattern. This method makes it easy to iterate over high-level records.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns Nothing on failure

(Classic ASP) Demonstrate the XML FindNextRecord Method

(Visual FoxPro) Demonstrate the XML FindNextRecord Method

(PowerBuilder) Demonstrate the XML FindNextRecord Method

(SQL Server) Demonstrate the XML FindNextRecord Method

(Visual Basic 6.0) Demonstrate the XML FindNextRecord Method

(VBScript) Demonstrate the XML FindNextRecord Method

FindOrAddNewChild(tagPath As String) As ChilkatXml

First checks for a child at tagPath, and if found, returns it. Otherwise creates a new child with empty content.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns Nothing on failure

FirstChild() As ChilkatXml

Returns the first child. A program can step through the children by calling FirstChild, and then NextSibling repeatedly.

Returns Nothing on failure

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

FirstChild2() As Long

Updates the internal reference of the caller to point to its first child.

Returns 1 for success, 0 for failure.

More information about XML methods ending in "2"

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

GetAttributeName(ByVal index As Long) As String

Returns the name of the Nth attribute of an XML node. The first attribute is at index 0.

Returns Nothing on failure

(Classic ASP) Methods for Getting Attributes

(Visual FoxPro) Methods for Getting Attributes

(PowerBuilder) Methods for Getting Attributes

(SQL Server) Methods for Getting Attributes

(Visual Basic 6.0) Methods for Getting Attributes

(VBScript) Methods for Getting Attributes

GetAttributeValue(ByVal index As Long) As String

Returns the value of the Nth attribute of an XML node. The first attribute is at index 0.

Returns Nothing on failure

(Classic ASP) Methods for Getting Attributes

(Visual FoxPro) Methods for Getting Attributes

(PowerBuilder) Methods for Getting Attributes

(SQL Server) Methods for Getting Attributes

(Visual Basic 6.0) Methods for Getting Attributes

(VBScript) Methods for Getting Attributes

GetAttributeValueInt(ByVal index As Long) As Long

Returns an attribute as an integer. Returns 0 if the attribute does not exist.

GetAttrValue(name As String) As String

Find and return the value of an attribute having a specified name.

Returns Nothing on failure

(Classic ASP) Methods for Getting Attributes

(Visual FoxPro) Methods for Getting Attributes

(PowerBuilder) Methods for Getting Attributes

(SQL Server) Methods for Getting Attributes

(Visual Basic 6.0) Methods for Getting Attributes

(VBScript) Methods for Getting Attributes

GetAttrValueInt(name As String) As Long

Returns an attribute as an integer. Returns 0 if the attribute does not exist.

(Classic ASP) Methods for Getting Attributes

(Visual FoxPro) Methods for Getting Attributes

(PowerBuilder) Methods for Getting Attributes

(SQL Server) Methods for Getting Attributes

(Visual Basic 6.0) Methods for Getting Attributes

(VBScript) Methods for Getting Attributes

GetBinaryContent(ByVal unzipFlag As Long, ByVal decryptFlag As Long, password As String) As Variant

Returns binary content of an XML node as a byte array. The content may have been Zip compressed, AES encrypted, or both. Unzip compression and AES decryption flags should be set appropriately.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

GetChild(ByVal index As Long) As ChilkatXml

Returns the Nth child of an XML node

Returns Nothing on failure

(Classic ASP) Iterate over Direct Child Nodes by Index

(Visual FoxPro) Iterate over Direct Child Nodes by Index

(PowerBuilder) Iterate over Direct Child Nodes by Index

(SQL Server) Iterate over Direct Child Nodes by Index

(Visual Basic 6.0) Iterate over Direct Child Nodes by Index

(VBScript) Iterate over Direct Child Nodes by Index

GetChild2(ByVal index As Long) As Long

Updates the calling object's internal reference to the Nth child node.

Returns 1 for success, 0 for failure.

More information about XML methods ending in "2"

(Classic ASP) Iterate over Direct Child Nodes by Index

(Visual FoxPro) Iterate over Direct Child Nodes by Index

(PowerBuilder) Iterate over Direct Child Nodes by Index

(SQL Server) Iterate over Direct Child Nodes by Index

(Visual Basic 6.0) Iterate over Direct Child Nodes by Index

(VBScript) Iterate over Direct Child Nodes by Index

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

GetChildBoolValue(tagPath As String) As Long

Returns 0 if the node's content is "0", otherwise returns 1 if the node contains a non-zero integer. The tagPath can be a tag or a tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "colors|primary|red".

(Classic ASP) Demonstrate the XML "I" Property

(Visual FoxPro) Demonstrate the XML "I" Property

(PowerBuilder) Demonstrate the XML "I" Property

(SQL Server) Demonstrate the XML "I" Property

(Visual Basic 6.0) Demonstrate the XML "I" Property

(VBScript) Demonstrate the XML "I" Property

GetChildContent(tagPath As String) As String

Returns the content of a child having a specified tag. The tagPath can be a tag or a tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "colors|primary|red".

Returns Nothing on failure

(Classic ASP) Demonstrate the XML "I" Property

(Visual FoxPro) Demonstrate the XML "I" Property

(PowerBuilder) Demonstrate the XML "I" Property

(SQL Server) Demonstrate the XML "I" Property

(Visual Basic 6.0) Demonstrate the XML "I" Property

(VBScript) Demonstrate the XML "I" Property

GetChildContentByIndex(ByVal index As Long) As String

Returns the content of the Nth child node.

Returns Nothing on failure

(Classic ASP) Iterate over Direct Child Nodes by Index

(Visual FoxPro) Iterate over Direct Child Nodes by Index

(PowerBuilder) Iterate over Direct Child Nodes by Index

(SQL Server) Iterate over Direct Child Nodes by Index

(Visual Basic 6.0) Iterate over Direct Child Nodes by Index

(VBScript) Iterate over Direct Child Nodes by Index

(Classic ASP) SQS List Queues

(Visual FoxPro) SQS List Queues

(PowerBuilder) SQS List Queues

(SQL Server) SQS List Queues

(Visual Basic 6.0) SQS List Queues

(VBScript) SQS List Queues

GetChildExact(tag As String, content As String) As ChilkatXml

Returns the child having the exact tag and content.

Returns Nothing on failure

GetChildIntValue(tagPath As String) As Long

Returns the child integer content for a given tag. The tagPath can be a tag or a tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "colors|primary|red".

(Classic ASP) Demonstrate the XML "I" Property

(Visual FoxPro) Demonstrate the XML "I" Property

(PowerBuilder) Demonstrate the XML "I" Property

(SQL Server) Demonstrate the XML "I" Property

(Visual Basic 6.0) Demonstrate the XML "I" Property

(VBScript) Demonstrate the XML "I" Property

GetChildTag(ByVal index As Long) As String

Returns the tag name of the Nth child node.

Returns Nothing on failure

GetChildTagByIndex(ByVal index As Long) As String

Returns the tag name of the Nth child node.

Returns Nothing on failure

(Classic ASP) Iterate over Direct Child Nodes by Index

(Visual FoxPro) Iterate over Direct Child Nodes by Index

(PowerBuilder) Iterate over Direct Child Nodes by Index

(SQL Server) Iterate over Direct Child Nodes by Index

(Visual Basic 6.0) Iterate over Direct Child Nodes by Index

(VBScript) Iterate over Direct Child Nodes by Index

GetChildWithAttr(tagPath As String, attrName As String, attrValue As String) As ChilkatXml

Finds and returns the XML child node having both a given tag and an attribute with a given name and value.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns Nothing on failure

(Classic ASP) XML GetChildWithAttr

(Visual FoxPro) XML GetChildWithAttr

(PowerBuilder) XML GetChildWithAttr

(SQL Server) XML GetChildWithAttr

(Visual Basic 6.0) XML GetChildWithAttr

(VBScript) XML GetChildWithAttr

GetChildWithContent(content As String) As ChilkatXml

Returns the first child found having the exact content specified.

Returns Nothing on failure

GetChildWithTag(tagPath As String) As ChilkatXml

Returns the child at the specified tag or tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

Returns Nothing on failure

GetNthChildWithTag(tag As String, ByVal n As Long) As ChilkatXml

Returns the Nth child having a tag that matches exactly with the tagName. Use the NumChildrenHavingTag method to determine how many children have a particular tag.

Returns Nothing on failure

(Classic ASP) Iterate over Direct Children with a Specific Tag

(Visual FoxPro) Iterate over Direct Children with a Specific Tag

(PowerBuilder) Iterate over Direct Children with a Specific Tag

(SQL Server) Iterate over Direct Children with a Specific Tag

(Visual Basic 6.0) Iterate over Direct Children with a Specific Tag

(VBScript) Iterate over Direct Children with a Specific Tag

GetNthChildWithTag2(tag As String, ByVal n As Long) As Long

Updates the calling object's internal reference to the Nth child node having a specific tag.

Returns 1 for success, 0 for failure.

(Classic ASP) Iterate over Direct Children with a Specific Tag

(Visual FoxPro) Iterate over Direct Children with a Specific Tag

(PowerBuilder) Iterate over Direct Children with a Specific Tag

(SQL Server) Iterate over Direct Children with a Specific Tag

(Visual Basic 6.0) Iterate over Direct Children with a Specific Tag

(VBScript) Iterate over Direct Children with a Specific Tag

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

GetParent() As ChilkatXml

Returns the parent of this XML node, or NULL if the node is the root of the tree.

Returns Nothing on failure

GetParent2() As Long

Updates the internal reference of the caller to its parent.

Returns 1 for success, 0 for failure.

More information about XML methods ending in "2"

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

GetRoot() As ChilkatXml

Returns the root node of the XML document

Returns Nothing on failure

GetRoot2()

Updates the internal reference of the caller to the document root.

More information about XML methods ending in "2"

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

GetSelf() As ChilkatXml

Returns a new XML object instance that references the same XML node.

Returns Nothing on failure

GetXml() As String

Generate the XML text document for the XML tree rooted at this node. If called from the root node of the XML document, then the XML declarator ("<?xml version="1.0" encoding="utf-8" ?>") is included at the beginning of the XML. Otherwise, it is not included.

Returns Nothing on failure

Long Strings Returned by ActiveX Methods in SQL Server

GetXmlSb(sb As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.62

Emits the XML to a StringBuilder object. (Appends to the existing contents of sb.)

Returns 1 for success, 0 for failure.

HasAttribute(name As String) As Long

Returns true if the node contains an attribute with the specified name.

HasAttrWithValue(name As String, value As String) As Long

Returns true if the node contains attribute with the name and value.

HasChildWithContent(content As String) As Long

Returns true if the node has a direct child node containing the exact content string specified.

HasChildWithTag(tagPath As String) As Long

Returns 1 if the node has a child with the given tag (or tag path). Otherwise returns 0.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

(Classic ASP) UpdateChildContent using a Tag Path

(Visual FoxPro) UpdateChildContent using a Tag Path

(PowerBuilder) UpdateChildContent using a Tag Path

(SQL Server) UpdateChildContent using a Tag Path

(Visual Basic 6.0) UpdateChildContent using a Tag Path

(VBScript) UpdateChildContent using a Tag Path

HasChildWithTagAndContent(tagPath As String, content As String) As Long

Returns 1 if the node contains child with the given tag (or tag path) and content specified.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

InsertChildTreeAfter(ByVal index As Long, tree As ChilkatXml)

Adds an entire subtree as a child. If the child was a subtree within another Xml document then the subtree is effectively transferred from one XML document to another. The child tree is inserted in a position after the Nth child (of the calling node).

InsertChildTreeBefore(ByVal index As Long, tree As ChilkatXml)

Adds an entire subtree as a child. If the child was a subtree within another Xml document then the subtree is effectively transferred from one XML document to another. The child tree is inserted in a position before the Nth child (of the calling node).

LastChild() As ChilkatXml

Returns the last Xml child node. A node's children can be enumerated by calling LastChild and then repeatedly calling PreviousSibling, until a NULL is returned.

Returns Nothing on failure

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

LastChild2() As Long

Updates the internal reference of the caller to its last child.

Returns 1 for success, 0 for failure.

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

LoadSb(sb As ChilkatStringBuilder, ByVal autoTrim As Long) As Long

Introduced in version 9.5.0.62

Loads XML from the contents of a StringBuilder object.

Returns 1 for success, 0 for failure.

LoadXml(xmlData As String) As Long

Loads an XML document from a memory buffer and returns 1 if successful. The contents of the calling node are replaced with the root node of the XML document loaded.

Returns 1 for success, 0 for failure.

LoadXml2(xmlData As String, ByVal autoTrim As Long) As Long

Same as LoadXml, but an additional argument controls whether or not leading/trailing whitespace is auto-trimmed from each node's content.

Returns 1 for success, 0 for failure.

LoadXmlFile(fileName As String) As Long

Loads an XML document from a file and returns 1 if successful. The contents of the calling node are replaced with the root node of the XML document loaded.

Returns 1 for success, 0 for failure.

LoadXmlFile2(fileName As String, ByVal autoTrim As Long) As Long

Same as LoadXmlFile, but an additional argument controls whether or not leading/trailing whitespace is auto-trimmed from each node's content.

Returns 1 for success, 0 for failure.

NewChild(tagPath As String, content As String) As ChilkatXml

Creates a new child having tag and content. The new child is created even if a child with a tag equal to tagPath already exists. (Use FindOrAddNewChild to prevent creating children having the same tags.)

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "colors|primary|red". See the example below for details.

Returns Nothing on failure

(Classic ASP) Creating a New Child Node

(Visual FoxPro) Creating a New Child Node

(PowerBuilder) Creating a New Child Node

(SQL Server) Creating a New Child Node

(Visual Basic 6.0) Creating a New Child Node

(VBScript) Creating a New Child Node

(Classic ASP) NewChild using a Tag Path

(Visual FoxPro) NewChild using a Tag Path

(PowerBuilder) NewChild using a Tag Path

(SQL Server) NewChild using a Tag Path

(Visual Basic 6.0) NewChild using a Tag Path

(VBScript) NewChild using a Tag Path

NewChild2(tagPath As String, content As String)

Creates a new child node, but does not return the node that is created. The tagPath can be a tag or a tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "colors|primary|red". See the example below for details.

(Classic ASP) Creating a New Child Node

(Visual FoxPro) Creating a New Child Node

(PowerBuilder) Creating a New Child Node

(SQL Server) Creating a New Child Node

(Visual Basic 6.0) Creating a New Child Node

(VBScript) Creating a New Child Node

(Classic ASP) XML NewChild2 using a Tag Path

(Visual FoxPro) XML NewChild2 using a Tag Path

(PowerBuilder) XML NewChild2 using a Tag Path

(SQL Server) XML NewChild2 using a Tag Path

(Visual Basic 6.0) XML NewChild2 using a Tag Path

(VBScript) XML NewChild2 using a Tag Path

NewChildAfter(ByVal index As Long, tag As String, content As String) As ChilkatXml

Inserts a new child in a position after the Nth child node.

Returns Nothing on failure

NewChildBefore(ByVal index As Long, tag As String, content As String) As ChilkatXml

Inserts a new child in a position before the Nth child node.

Returns Nothing on failure

NewChildInt2(tagPath As String, ByVal value As Long)

Inserts a new child having an integer for content. The tagPath can be a tag or a tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "colors|primary|red". See the example below for details.

(Classic ASP) Demonstrate the XML NewChildInt2 Method

(Visual FoxPro) Demonstrate the XML NewChildInt2 Method

(PowerBuilder) Demonstrate the XML NewChildInt2 Method

(SQL Server) Demonstrate the XML NewChildInt2 Method

(Visual Basic 6.0) Demonstrate the XML NewChildInt2 Method

(VBScript) Demonstrate the XML NewChildInt2 Method

NextSibling() As ChilkatXml

Returns the nodes next sibling, or NULL if there are no more.

Returns Nothing on failure

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

NextSibling2() As Long

Updates the internal reference of the caller to its next sibling.

Returns 1 for success, 0 for failure.

More information about XML methods ending in "2"

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

NumChildrenAt(tagPath As String) As Long

Introduced in version 9.5.0.64

Returns the number of children for the node indicated by tagPath. Returns -1 if the node at tagPath does not exist.

(Classic ASP) Demonstrate the XML "I" Property

(Visual FoxPro) Demonstrate the XML "I" Property

(PowerBuilder) Demonstrate the XML "I" Property

(SQL Server) Demonstrate the XML "I" Property

(Visual Basic 6.0) Demonstrate the XML "I" Property

(VBScript) Demonstrate the XML "I" Property

(Classic ASP) Demonstrate the XML I, J, and K Properties

(Visual FoxPro) Demonstrate the XML I, J, and K Properties

(PowerBuilder) Demonstrate the XML I, J, and K Properties

(SQL Server) Demonstrate the XML I, J, and K Properties

(Visual Basic 6.0) Demonstrate the XML I, J, and K Properties

(VBScript) Demonstrate the XML I, J, and K Properties

(Classic ASP) Get XML Attribute Value by Path

(Visual FoxPro) Get XML Attribute Value by Path

(PowerBuilder) Get XML Attribute Value by Path

(SQL Server) Get XML Attribute Value by Path

(Visual Basic 6.0) Get XML Attribute Value by Path

(VBScript) Get XML Attribute Value by Path

NumChildrenHavingTag(tag As String) As Long

Returns the number of children having a specific tag name.

(Classic ASP) Iterate over Direct Children with a Specific Tag

(Visual FoxPro) Iterate over Direct Children with a Specific Tag

(PowerBuilder) Iterate over Direct Children with a Specific Tag

(SQL Server) Iterate over Direct Children with a Specific Tag

(Visual Basic 6.0) Iterate over Direct Children with a Specific Tag

(VBScript) Iterate over Direct Children with a Specific Tag

PreviousSibling() As ChilkatXml

Returns the Xml object that is the node's previous sibling, or NULL if there are no more.

Returns Nothing on failure

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

PreviousSibling2() As Long

Updates the internal reference of the caller to its previous sibling.

Returns 1 for success, 0 for failure.

More information about XML methods ending in "2"

(Classic ASP) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual FoxPro) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(PowerBuilder) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(SQL Server) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Visual Basic 6.0) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(VBScript) Traverse Direct Children via FirstChild / NextSibling, or LastChild / PreviousSibling

(Classic ASP) Benefit of XML Methods Having Names Ending in "2"

(Visual FoxPro) Benefit of XML Methods Having Names Ending in "2"

(PowerBuilder) Benefit of XML Methods Having Names Ending in "2"

(SQL Server) Benefit of XML Methods Having Names Ending in "2"

(Visual Basic 6.0) Benefit of XML Methods Having Names Ending in "2"

(VBScript) Benefit of XML Methods Having Names Ending in "2"

QEncodeContent(charset As String, inData As Variant) As Long

Sets the node's content with 8bit data that is in a specified multibyte character encoding such as utf-8, shift-jis, big5, etc. The data is first Q-encoded and the content is set to be the Q-encoded string. For example, if called with "gb2312"for the charset, you would get a string that looks something like this: "=?gb2312?Q?=C5=B5=BB=F9?=". Character that are not 7bit are represented as "=XX" where XX is the hexidecimal value of the byte. Use the DecodeContent method to retrieve the byte data from a Q encoded string.

Returns 1 for success, 0 for failure.

RemoveAllAttributes() As Long

Removes all attributes from an XML node. Should always return True.

Returns 1 for success, 0 for failure.

RemoveAllChildren()

Removes all children from the calling node.

RemoveAttribute(name As String) As Long

Removes an attribute by name from and XML node.

Returns 1 for success, 0 for failure.

RemoveChild(tagPath As String)

Removes all children with a given tag or tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

(Classic ASP) Removing / Deleting Child Nodes from XML

(Visual FoxPro) Removing / Deleting Child Nodes from XML

(PowerBuilder) Removing / Deleting Child Nodes from XML

(SQL Server) Removing / Deleting Child Nodes from XML

(Visual Basic 6.0) Removing / Deleting Child Nodes from XML

(VBScript) Removing / Deleting Child Nodes from XML

(Classic ASP) RemoveChild using a Tag Path

(Visual FoxPro) RemoveChild using a Tag Path

(PowerBuilder) RemoveChild using a Tag Path

(SQL Server) RemoveChild using a Tag Path

(Visual Basic 6.0) RemoveChild using a Tag Path

(VBScript) RemoveChild using a Tag Path

RemoveChildByIndex(ByVal index As Long)

Removes the Nth child from the calling node.

(Classic ASP) Removing / Deleting Child Nodes from XML

(Visual FoxPro) Removing / Deleting Child Nodes from XML

(PowerBuilder) Removing / Deleting Child Nodes from XML

(SQL Server) Removing / Deleting Child Nodes from XML

(Visual Basic 6.0) Removing / Deleting Child Nodes from XML

(VBScript) Removing / Deleting Child Nodes from XML

RemoveChildWithContent(content As String)

Removes all children having the exact content specified.

(Classic ASP) Removing / Deleting Child Nodes from XML

(Visual FoxPro) Removing / Deleting Child Nodes from XML

(PowerBuilder) Removing / Deleting Child Nodes from XML

(SQL Server) Removing / Deleting Child Nodes from XML

(Visual Basic 6.0) Removing / Deleting Child Nodes from XML

(VBScript) Removing / Deleting Child Nodes from XML

RemoveFromTree()

Removes the calling object and its sub-tree from the XML document making it the root of its own tree.

(Classic ASP) Removing / Deleting Child Nodes from XML

(Visual FoxPro) Removing / Deleting Child Nodes from XML

(PowerBuilder) Removing / Deleting Child Nodes from XML

(SQL Server) Removing / Deleting Child Nodes from XML

(Visual Basic 6.0) Removing / Deleting Child Nodes from XML

(VBScript) Removing / Deleting Child Nodes from XML

SaveBinaryContent(filename As String, ByVal unzipFlag As Long, ByVal decryptFlag As Long, password As String) As Long

Saves a node's binary content to a file.

Returns 1 for success, 0 for failure.

SaveXml(fileName As String) As Long

Generates XML representing the tree or subtree rooted at this node and writes it to a file.

Returns 1 for success, 0 for failure.

SearchAllForContent(afterPtr As ChilkatXml, contentPattern As String) As ChilkatXml

Returns the first node having content matching the contentPattern. The contentPattern is a case-sensitive string that may contain any number of '*'s, each representing 0 or more occurrences of any character. The search is breadth-first over the sub-tree rooted at the caller. A match is returned only after the search has traversed past the node indicated by afterPtr. To find the 1st occurrence, set afterPtr equal to Nothing. (For the ActiveX implementation, the afterPtr should never be Nothing. A reference to the caller's node should be passed instead.)

To iterate over matching nodes, the returned node can be passed in afterPtr for the next call to SearchAllForContent, until the method returns Nothing.

Returns Nothing on failure

(Classic ASP) XML Tree Traversal Order for Search* Methods

(Visual FoxPro) XML Tree Traversal Order for Search* Methods

(PowerBuilder) XML Tree Traversal Order for Search* Methods

(SQL Server) XML Tree Traversal Order for Search* Methods

(Visual Basic 6.0) XML Tree Traversal Order for Search* Methods

(VBScript) XML Tree Traversal Order for Search* Methods

SearchAllForContent2(afterPtr As ChilkatXml, contentPattern As String) As Long

Same as SearchAllForContent except the internal reference of the caller is updated to point to the search result (instead of returning a new object).

Returns 1 for success, 0 for failure.

SearchForAttribute(afterPtr As ChilkatXml, tag As String, attr As String, valuePattern As String) As ChilkatXml

Returns the first node having a tag equal to tag, an attribute named attr, whose value matches valuePattern. The valuePattern is a case-sensitive string that may contain any number of '*'s, each representing 0 or more occurrences of any character. The search is breadth-first over the sub-tree rooted at the caller. A match is returned only after the search has traversed past the node indicated by afterPtr. To find the 1st occurrence, set afterPtr equal to Nothing. (For the ActiveX implementation, the afterPtr should never be Nothing. A reference to the caller's node should be passed instead.)

To iterate over matching nodes, the returned node can be passed in afterPtr for the next call to SearchForAttribute, until the method returns Nothing.

Returns Nothing on failure

(Classic ASP) XML SearchForAttribute Method

(Visual FoxPro) XML SearchForAttribute Method

(PowerBuilder) XML SearchForAttribute Method

(SQL Server) XML SearchForAttribute Method

(Visual Basic 6.0) XML SearchForAttribute Method

(VBScript) XML SearchForAttribute Method

(Classic ASP) XML Tree Traversal Order for Search* Methods

(Visual FoxPro) XML Tree Traversal Order for Search* Methods

(PowerBuilder) XML Tree Traversal Order for Search* Methods

(SQL Server) XML Tree Traversal Order for Search* Methods

(Visual Basic 6.0) XML Tree Traversal Order for Search* Methods

(VBScript) XML Tree Traversal Order for Search* Methods

SearchForAttribute2(afterPtr As ChilkatXml, tag As String, attr As String, valuePattern As String) As Long

Same as SearchForAttribute except the internal reference of the caller is updated to point to the search result (instead of returning a new object).

Returns 1 for success, 0 for failure.

SearchForContent(afterPtr As ChilkatXml, tag As String, contentPattern As String) As ChilkatXml

Returns the first node having a tag equal to tag, whose content matches contentPattern. The contentPattern is a case-sensitive string that may contain any number of '*'s, each representing 0 or more occurrences of any character. The search is breadth-first over the sub-tree rooted at the caller. A match is returned only after the search has traversed past the node indicated by afterPtr. To find the 1st occurrence, set afterPtr equal to Nothing. (For the ActiveX implementation, the afterPtr should never be Nothing. A reference to the caller's node should be passed instead.)

To iterate over matching nodes, the returned node can be passed in afterPtr for the next call to SearchForContent, until the method returns Nothing.

Returns Nothing on failure

(Classic ASP) XML Tree Traversal Order for Search* Methods

(Visual FoxPro) XML Tree Traversal Order for Search* Methods

(PowerBuilder) XML Tree Traversal Order for Search* Methods

(SQL Server) XML Tree Traversal Order for Search* Methods

(Visual Basic 6.0) XML Tree Traversal Order for Search* Methods

(VBScript) XML Tree Traversal Order for Search* Methods

SearchForContent2(afterPtr As ChilkatXml, tag As String, contentPattern As String) As Long

Same as SearchForContent except the internal reference of the caller is updated to point to the search result (instead of returning a new object).

Returns 1 for success, 0 for failure.

(Classic ASP) XML Tree Traversal Order for Search* Methods

(Visual FoxPro) XML Tree Traversal Order for Search* Methods

(PowerBuilder) XML Tree Traversal Order for Search* Methods

(SQL Server) XML Tree Traversal Order for Search* Methods

(Visual Basic 6.0) XML Tree Traversal Order for Search* Methods

(VBScript) XML Tree Traversal Order for Search* Methods

SearchForTag(afterPtr As ChilkatXml, tag As String) As ChilkatXml

Returns the first node having a tag equal to tag. The search is breadth-first over the sub-tree rooted at the caller. A match is returned only after the search has traversed past the node indicated by afterPtr. To find the 1st occurrence, set afterPtr equal to Nothing. (For the ActiveX implementation, the afterPtr should never be Nothing. A reference to the caller's node should be passed instead.)

To iterate over matching nodes, the returned node can be passed in afterPtr for the next call to SearchForTag, until the method returns Nothing.

Returns Nothing on failure

(Classic ASP) XML SearchForTag Method

(Visual FoxPro) XML SearchForTag Method

(PowerBuilder) XML SearchForTag Method

(SQL Server) XML SearchForTag Method

(Visual Basic 6.0) XML SearchForTag Method

(VBScript) XML SearchForTag Method

(Classic ASP) XML Tree Traversal Order for Search* Methods

(Visual FoxPro) XML Tree Traversal Order for Search* Methods

(PowerBuilder) XML Tree Traversal Order for Search* Methods

(SQL Server) XML Tree Traversal Order for Search* Methods

(Visual Basic 6.0) XML Tree Traversal Order for Search* Methods

(VBScript) XML Tree Traversal Order for Search* Methods

SearchForTag2(afterPtr As ChilkatXml, tag As String) As Long

Same as SearchForTag except the internal reference of the caller is updated to point to the search result (instead of returning a new object).

Returns 1 for success, 0 for failure.

SetBinaryContent(inData As Variant, ByVal zipFlag As Long, ByVal encryptFlag As Long, password As String) As Long

Sets the node's content to a block of binary data with optional Zip compression and/or AES encryption. The binary data is automatically converted to base64 format whenever XML text is generated. If the zipFlag is True, the data is first compressed. If the encryptFlag is True, the data is AES encrypted using the Rijndael 128-bit symmetric-encryption algorithm.

Returns 1 for success, 0 for failure.

SetBinaryContentFromFile(filename As String, ByVal zipFlag As Long, ByVal encryptFlag As Long, password As String) As Long

Sets the node's content with binary (or text) data from a file. The file contents can be Zip compressed and/or encrypted, and the result is base-64 encoded.

Returns 1 for success, 0 for failure.

SortByAttribute(attrName As String, ByVal ascending As Long)

Sorts the direct child nodes by the value of a specified attribute.

SortByAttributeInt(attrName As String, ByVal ascending As Long)

Sorts the direct child nodes by the value of a specified attribute interpreted as an integer (not lexicographically as strings).

SortByContent(ByVal ascending As Long)

Sorts the direct child nodes by content.

(Classic ASP) XML Sort by Content

(Visual FoxPro) XML Sort by Content

(PowerBuilder) XML Sort by Content

(SQL Server) XML Sort by Content

(Visual Basic 6.0) XML Sort by Content

(VBScript) XML Sort by Content

SortByTag(ByVal ascending As Long)

Sorts the direct child nodes by tag.

(Classic ASP) XML Sort by Tag

(Visual FoxPro) XML Sort by Tag

(PowerBuilder) XML Sort by Tag

(SQL Server) XML Sort by Tag

(Visual Basic 6.0) XML Sort by Tag

(VBScript) XML Sort by Tag

SortRecordsByAttribute(sortTag As String, attrName As String, ByVal ascending As Long)

Sorts the direct child nodes by the content of an attribute in the grandchild nodes.

SortRecordsByContent(sortTag As String, ByVal ascending As Long)

Sorts the direct child nodes by the content of the grandchild nodes.

(Classic ASP) XML Sort Records by Content

(Visual FoxPro) XML Sort Records by Content

(PowerBuilder) XML Sort Records by Content

(SQL Server) XML Sort Records by Content

(Visual Basic 6.0) XML Sort Records by Content

(VBScript) XML Sort Records by Content

SortRecordsByContentInt(sortTag As String, ByVal ascending As Long)

Sorts the direct child nodes by the content of the grandchild nodes. For sorting purposes, the content is interpreted as an integer (not lexicographically as for strings).

SwapNode(node As ChilkatXml) As Long

Swaps another node's tag, content, and attributes with this one.

Returns 1 for success, 0 for failure.

SwapTree(tree As ChilkatXml) As Long

Swaps another node's tag, content, attributes, and children with this one.

Returns 1 for success, 0 for failure.

TagContent(tagName As String) As String

Returns the content of the 1st node found in the sub-tree rooted at the caller that has a given tag. (Note: The search for the node having tag ARG is not limited to the direct children of the caller.)

Returns Nothing on failure

TagEquals(tag As String) As Long

Returns 1 if the node's tag equals the specified string.

UnzipContent() As Long

Unzip the content of the XML node replacing it's content with the decompressed data.

Returns 1 for success, 0 for failure.

(Classic ASP) Compress XML Content

(Visual FoxPro) Compress XML Content

(PowerBuilder) Compress XML Content

(SQL Server) Compress XML Content

(Visual Basic 6.0) Compress XML Content

(VBScript) Compress XML Content

UnzipTree() As Long

Unzips and recreates the XML node and the entire subtree, restoring it to the state before it was zip compressed.

Returns 1 for success, 0 for failure.

(Classic ASP) Compress XML Tree

(Visual FoxPro) Compress XML Tree

(PowerBuilder) Compress XML Tree

(SQL Server) Compress XML Tree

(Visual Basic 6.0) Compress XML Tree

(VBScript) Compress XML Tree

UpdateAt(tagPath As String, ByVal autoCreate As Long, value As String) As Long

Introduced in version 9.5.0.64

Updates the content for the node indicated by tagPath. If autoCreate is 1, then nodes along tagPath are auto-created as needed.

(Classic ASP) Demonstrate the XML UpdateAt Method

(Visual FoxPro) Demonstrate the XML UpdateAt Method

(PowerBuilder) Demonstrate the XML UpdateAt Method

(SQL Server) Demonstrate the XML UpdateAt Method

(Visual Basic 6.0) Demonstrate the XML UpdateAt Method

(VBScript) Demonstrate the XML UpdateAt Method

UpdateAttrAt(tagPath As String, ByVal autoCreate As Long, attrName As String, attrValue As String) As Long

Introduced in version 9.5.0.64

Updates or adds the attribute value for the node indicated by tagPath. If autoCreate is 1, then nodes along tagPath are auto-created as needed.

(Classic ASP) Demonstrate the XML UpdateAttrAt Method

(Visual FoxPro) Demonstrate the XML UpdateAttrAt Method

(PowerBuilder) Demonstrate the XML UpdateAttrAt Method

(SQL Server) Demonstrate the XML UpdateAttrAt Method

(Visual Basic 6.0) Demonstrate the XML UpdateAttrAt Method

(VBScript) Demonstrate the XML UpdateAttrAt Method

(Classic ASP) Xml.UpdateAttrAt Example #2

(Visual FoxPro) Xml.UpdateAttrAt Example #2

(PowerBuilder) Xml.UpdateAttrAt Example #2

(SQL Server) Xml.UpdateAttrAt Example #2

(Visual Basic 6.0) Xml.UpdateAttrAt Example #2

(VBScript) Xml.UpdateAttrAt Example #2

UpdateAttribute(attrName As String, attrValue As String) As Long

Adds an attribute to the node if it doesn't already exist. Otherwise it updates the existing attribute with the new value.

Returns 1 for success, 0 for failure.

(Classic ASP) Update an XML Attribute

(Visual FoxPro) Update an XML Attribute

(PowerBuilder) Update an XML Attribute

(SQL Server) Update an XML Attribute

(Visual Basic 6.0) Update an XML Attribute

(VBScript) Update an XML Attribute

UpdateAttributeInt(attrName As String, ByVal value As Long) As Long

Updates an attribute value. (Call UpdateAttribute if the attribute value is a string.)

Returns 1 for success, 0 for failure.

UpdateChildContent(tagPath As String, value As String)

Replaces the content of a child node. The tagPath can be a tag or tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

(Classic ASP) UpdateChildContent using a Tag Path

(Visual FoxPro) UpdateChildContent using a Tag Path

(PowerBuilder) UpdateChildContent using a Tag Path

(SQL Server) UpdateChildContent using a Tag Path

(Visual Basic 6.0) UpdateChildContent using a Tag Path

(VBScript) UpdateChildContent using a Tag Path

(Classic ASP) Xml.ChildContent Example #2

(Visual FoxPro) Xml.ChildContent Example #2

(PowerBuilder) Xml.ChildContent Example #2

(SQL Server) Xml.ChildContent Example #2

(Visual Basic 6.0) Xml.ChildContent Example #2

(VBScript) Xml.ChildContent Example #2

UpdateChildContentInt(tagPath As String, ByVal value As Long)

Replaces the content of a child node where the content is an integer. The tagPath can be a tag or tag path.

Beginning in version 9.5.0.64, the tagPath can be a tag path. A tag path is a series of tags separated by vertical bar characters. For example: "tagA|tagB|tagC".

ZipContent() As Long

Applies Zip compression to the content of an XML node and replaces the content with base64-encoded compressed data.

Returns 1 for success, 0 for failure.

(Classic ASP) Compress XML Content

(Visual FoxPro) Compress XML Content

(PowerBuilder) Compress XML Content

(SQL Server) Compress XML Content

(Visual Basic 6.0) Compress XML Content

(VBScript) Compress XML Content

ZipTree() As Long

Zip compresses the content and entire subtree rooted at the calling XML node and replaces the current content with base64-encoded Zip compressed data. The node and subtree can be restored by calling UnzipTree. Note that the node name and attributes are unaffected.

Returns 1 for success, 0 for failure.

(Classic ASP) Compress XML Tree

(Visual FoxPro) Compress XML Tree

(PowerBuilder) Compress XML Tree

(SQL Server) Compress XML Tree

(Visual Basic 6.0) Compress XML Tree

(VBScript) Compress XML Tree