Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

  

  

  Chilkat ActiveX Components

  Chilkat .NET Components

  Chilkat C++ Libraries

  

  

  

  

 

FAQ



Chilkat Online Reference Documentation


XML Parser Reference

PURCHASE 1-YEAR UNLIMITED SUPPORT

Asp Xml Properties

Cdata As Boolean read/write
When TRUE, the Content is encapsulated in a CDATA section. [top]
Content As String read/write
This is the content of the node. It is the text between the open and close tags, such as:
<tag>This is the content</tag>
[top]
 
Encoding As String read/write
This is the encoding attribute in the XML declaration. If not present, then this property returns an empty string. 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 causes the document to be converted to the encoding when saved. [top]
 
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> [top]
NumChildren As Long read-only
The number of child nodes. [top]
Standalone As String read/write
Should be set to "yes" or "no". This is the standalone attribute in the XML declaration. If not present, then this property returns an empty string. This property can be set from any node in the XML document and when set, causes the standalone property to be added to the XML declaration. [top]
 
Tag As String read/write
The string that is the tag. [top]
 
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 nodes (i.e. Chilkat XML objects) belong to the same tree. [top]
 
Version As String read-only
The version of this component, such as "1.0" [top]

Asp Xml Methods

AddAttribute(name as String, value as String)
Adds an attribute to the node. [top]
 
AddChildTree(rootNode As AspXml)
Adds an entire subtree as a child. If the rootNode was a subtree within another Xml tree (document) then the subtree is effectively transferred from one tree to another. [top]
 
AppendToContent(moreContent As String)
Appends character data to the Content property. [top]
BEncodeContent(charset As String, byteData As Variant)
This sets the node's content with 8-bit 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. [top]
Clear()
Removes all children, attributes, and content. Resets the tag name to "unnamed". [top]
CompressNode()
Compresses and Base64 encodes the Content. The Content may be decoded and decompressed by calling DecompressNode. [top]
CompressSubtree()
Compresses the Content and entire subtree under the calling node, and replaces the Content/subtree with the compressed and base64-encoded data which can be later expanded by calling DecompressSubtree. [top]
DecodeContent() As Variant
Decodes a Q or B-encoded content string and returns the byte data in a Variant (byte array). See BEncodeContent and QEncodeContent.
DecompressNode()
Decodes and decompresses the Content that was previously compressed by calling CompressNode. [top]
 
DecompressSubtree()
Decodes, decompresses, and recreates the content and subtree that was compressed by calling CompressSubtree. [top]
 
DecryptNode(password As String)
Decodes and decrypts the Content of the calling node, which was originally encrypted by calling EncryptNode. The password must match the password provided during encryption, or you will receive gobbly-gook. [top]
 
EncryptNode(password As String)
Encrypts and base64 encodes the Content of the calling node. The encryption uses 128-bit AES (Rijndael) algorithm (Cipher-Block Chaining mode). [top
ExtractChildByIndex(index as Long) As AspXml
Removes and returns a child node. The first child is at index 0. [top]
 
ExtractChildByName(tagName As String, attributeName as String, attrValue as String) As AspXml
Removes and returns the first child node having a tag equal to the tagName. The attributeName and attrValue may be empty or NULL, in which case the first child matching the tag is removed and returned. If attributeName is specified, then the first child having a tag equal to tagName, and an attribute with attributeName is returned. If attrValue is also specified, then only a child having a tag equal to tagName, and an attribute named attributeName, with a value equal to attrValue is returned. [top]
 
FindOrAddNewChild(tagName As String) As AspXml
First searches for a child having a tag equal to tagName, and if found, returns it. Otherwise creates a new child, sets the tag equal to tagName, and initializes the Content to empty. [top]
 
FirstChild() As AspXml
Returns the first child. A program can step through the children by calling FirstChild, and then NextSibling repeatedly. [Code Snippet] [top]
FirstChild2() As Long
Same as FirstChild, except the calling object is updated to reference the first child instead of creating and returning a new object. Returns 1 if updated, returns 0 if there are no children. This method can be used (instead of FirstChild) to help minimize the number of objects created and destroyed in your program. [top]
FindNextRecord(tag As String, contentPattern As String) As AspXml
Returns the current record or the next sibling having a child with tag matching the contentPattern. As an example, imagine the caller has child nodes that are contact nodes, each of which has a child for name, address, phone, city, etc. This method would allow you to find the next contact record where one of the grandchildren (such as "city") matches a pattern, such as "New *". One could write a program to iterate over contact records matching a criteria. [top
GetAttributeName(index As Long) As String
Returns the name of the an attribute. The first attribute is at index 0. The number of attributes is found in the NumAttributes property. [top]
 
GetAttributeValue(index As Long) As String
Returns the value of the an attribute. The first attribute is at index 0. The number of attributes is found in the NumAttributes property. [top]
 
GetAttrValue(attributeName As String) As String
Returns the value of an attribute. If the attribute is not present, NULL is returned. [top]
GetBinaryContent(zipFlag As Long, encryptFlag As Long, password As String) As Variant
Retrieves binary content that was previously encoded using SetBinaryContent. The parameters must match those used when setting the content. If zipFlag is 1, the content is unzipped. If encryptFlag is 1, the content is decrypted using the password parameter. (Encryption is 128-bit AES strong encryption.) [top]
GetChild(index As Long) As AspXml
Returns a child by index. The first child is at index 0. The number of children can be found in the NumChildren property. [top]
GetChild2(index As Long) As Long
Same as GetChild, except the calling object is updated to reference the child instead of creating and returning a new object. Returns 1 if updated, returns 0 if there is no child at the index.This method can be used (instead of GetChild) to help minimize the number of objects created and destroyed in your program. [top]
GetChildContent(tagName As String) As String
Returns the Content property of the child having tagName
GetChildWithTag(tagName As String) As AspXml
Returns the child having a tag equal to tagName. [top]
 
GetNthChildWithTag(tagName As String, index As Long) As AspXml
Returns the Nth child having a tag equal to tagName. (Use NumChildrenHavingTag to find the number of children having a given tag.) Indexing begins at 0. [top]
 
GetParent() As AspXml
Returns this node's parent, or NULL if this is the root of the tree. [top]
GetParent2() As Long
Same as GetParent, except the calling object is updated to reference the parent instead of creating and returning a new object. Returns 1 if updated, returns 0 if there is no parent. This method can be used (instead of GetParent) to help minimize the number of objects created and destroyed in your program. [top]
GetRoot() As AspXml
Returns the root node of the tree. [top]
GetRoot2()
Same as GetRoot, except the calling object is updated to reference the tree root instead of creating and returning a new object. This method can be used (instead of GetRoot) to help minimize the number of objects created and destroyed in your program. [top]
GetUrl( url As String, proxy As String, login As String, password As String) As Variant
Sends an HTTP request and gets the response. The proxy, login, and password parameters are optional. This is a convenience method to make it easy to do simple HTTP requests without the use of an HTTP component. [top]
GetXml() As String
Generates XML that represents the tree or subtree rooted at this node. [top]
 
HasAttrWithValue(attrName As String, attrValue As String) As Long
Returns 1 if this node has an attribute with the given name and value, otherwise returns 0. [top]
HttpPost(url As String) As AspXml
(Sends an XMLHTTP request) Provides client-side protocol support for communication with HTTP servers. A client computer can use this method to send an arbitrary HTTP request, receive the response, and have ASP XML parse that response.

The request body is sent directly from the calling ASP XML object and the response is parsed directly into the returned ASP XML object. When combined with the support for Extensible Stylesheet Language (XSL), this provides an easy way to send structured queries to HTTP servers and efficiently display the results with a variety of presentations.

For an example, click HERE.
LastChild() As AspXml
Returns the last child. A node's children can be enumerated by calling LastChild and then repeatedly calling PreviousSibling, until a NULL is returned. [top]
LastChild2() As Long
Same as LastChild, except an existing object is used and set to reference the internal document node instead of creating and returning a new object. Returns 1 if updated, returns 0 if there are no children. This method can be used (instead of LastChild) to help minimize the number of objects created and destroyed in your program. [top]
LoadRequest( )
Loads the XML document passed via XMLHTTP in the ASP Request object. [top]
LoadXml(xmlData As String) As Long
Loads XML from a String and creates a tree with this node at the root. Return 1 if the Xml was successfully parsed and loaded. Returns 0 for failure. [top]
LoadXmlV(xmlData As Variant) As Long
Loads XML from a Variant and creates a tree with this node at the root. Return 1 if the Xml was successfully parsed and loaded. Returns 0 for failure. [top]
LoadXmlFile(filename As String) As Long
Loads XML from a file, and creates a tree with this node at the root. Return 1 if the Xml was successfully parsed and loaded. Returns 0 for failure. [top]
 
NewChild(tagName As String, content As String) As AspXml
Creates a new child having tag and content. The new child is created even if a child with a tag equal to tagName already exists. (Use FindOrAddNewChild to prevent creating children having the same tags.) [top]
NewChild2(tagName As String, content As String)
Same as NewChild except it doesn't return the child that is created.[top]
NextSibling() As AspXml
Returns this node's next sibling. [top]
NextSibling2() As Long
Same as NextSibling, except the calling object is updated to reference the next sibling instead of creating and returning a new object. Returns 1 if updated, returns 0 if there are no more siblings. This method can be used (instead of NextSibling) to help minimize the number of objects created and destroyed in your program. [top]
NumChildrenHavingTag(tagName As String) As Long
Returns the number of children having a tag equal to tagName. [top]
 
PreviousSibling() As AspXml
Returns the node's previous sibling. [top]
PreviousSibling2() As Long
Same as PreviousSibling, except the calling object is updated to reference the previous sibling instead of creating and returning a new object. Returns 1 if updated, returns 0 if there are no more siblings. This method can be used (instead of PreviousSibling) to help minimize the number of objects created and destroyed in your program. [top]
QEncodeContent(charset As String, byteData As Variant)
This sets the node's content with 8-bit 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. [top]
RemoveAllAttributes()
Removes all attributes from the node. [top]
 
RemoveAttribute(attrName As String)
Removes all atributes named attrName from the node. [top]
RemoveFromTree( )
Removes this node and its subtree from its tree and makes it a root of a new tree.[top]
SaveXml(filename As String)
Generates XML representing the tree or subtree rooted at this node and writes it to a file. [top]
 
SearchAllForContent(afterNode As AspXml, contentPattern As String) As AspXml
Returns the first node whose content matches the contentPattern, which is a case-sensitive string that can use any number of '*'s to represent 0 or more occurances of any character. The search is breadth-first over the tree, and the previous node returned can be passed to the next call as afterNode to continue the search after that node. [top]
 
SearchForAttribute(afterNode As AspXml, tagName As String, attrName As String, valuePattern As String) As AspXml
Returns the first node having a tag equal to tagName, and an attribute named attrName whose value matches valuePattern, which is a case-sensitive string that can use any number of '*'s to represent 0 or more occurances of any character. The search is breadth-first over the tree, and the previous node returned can be passed to the next call as afterNode to continue the search after that node. [top]
 
SearchForContent(afterNode As AspXml, tagName As String, contentPattern As String) As AspXml
Returns the first node having a tag equal to tagName whose content matches contentPattern, which is a case-sensitive string that can use any number of '*'s to represent 0 or more occurances of any character. The search is breadth-first over the tree, and the previous node returned can be passed to the next call as afterNode to continue the search after that node. [top]
 
SearchForTag(afterNode As AspXml, tagName As String) As AspXml
Returns the first node having a tag equal to tagName. The search is breadth-first over the tree, and the previous node returned can be passed to the next call as afterNode to continue the search after that node. [top]
SetBinaryContent(zipFlag As Long, encryptFlag As Long, password As String, byteData As Variant)
Sets the node's content with binary data. The binary data is taken, Zip compressed if zipFlag is 1, encrypted using 128-bit AES encryption if encryptFlag is 1, and Base64-encoded. The password parameter is only used if encryptFlag is 1. Use GetBinaryContent with the same parameter values to retrieve the binary data from the node. [top]
SortByAttribute(attributeName As String, ascending As Long)
Sorts the children of the calling node by the an attribute. The ascending parameter can be 1 or 0. (0 = descending order).[top]
SortByContent(ascending As Long)
Sorts the children of the calling node by the value of each child's content. The ascending parameter can be 1 or 0. (0 = descending order). [top]
SortByTag(ascending As Long)
Sorts the children of the calling node by each child's tag. The ascending parameter can be 1 or 0. (0 = descending order). [top]
SortRecordsByAttribute(sortTag As String, attributeName As String, ascending As Long)
Sorts the children of the calling node by and attribute in the grandchild nodes having the sortTag. As an example, imagine that the children of the calling node are contact records, each of which has child nodes for name, address, city, phone, etc. The contact records could be sorted by an attribute on one of the contact child nodes. [top]
 
SortRecordsByContent(sortTag As String, ascending As Long)
Sorts the children of the calling node by content in the grandchild nodes having the sortTag. As an example, imagine that the children of the calling node are contact records, each of which has child nodes for name, address, city, phone, etc. The contact records could be sorted by these values. [top]
SwapNode(node As AspXml)
Swaps another node's tag, content, and attributes with this one. [top]
 
SwapTree(node As AspXml)
Swaps another node's tag, content, attributes, and children with this one. [top]
 
UpdateAttribute(attrName As String, attrValue As String)
Adds an attribute to the node if it doesn't already exist. Otherwise it updates the existing attribute with the new value. [top]

 

 

Properties

Cdata
Content
Encoding
NumAttributes
NumChildren
Standalone
Tag
TreeId
Version

Methods

AddAttribute
AddChildTree
AppendToContent
BEncodeContent
Clear
CompressNode
CompressSubtree

DecodeContent
DecompressNode DecompressSubtree
DecryptNode
EncryptNode

ExtractChildByIndex
ExtractChildByName
FindChild
FindChild2
FindNextRecord

FindOrAddNewChild
FirstChild
FirstChild2
GetAttributeName
GetAttributeValue
GetAttrValue
GetBinaryContent

GetChild
GetChild2
GetChildContent
GetChildWithTag
GetNthChildWithTag
GetParent
GetParent2
GetRoot
GetRoot2
GetURL
GetXml
HasAttrWithValue
LastChild
LastChild2
LoadRequest
LoadXml
LoadXmlV
LoadXmlFile
NewChild
NewChild2
NextSibling
NextSibling2
NumChildrenHavingTag
PreviousSibling
PreviousSibling2
QEncodeContent
RemoveAllAttributes
RemoveAttribute
RemoveFromTree
SaveXml
SearchAllForContent
SearchForAttribute
SearchForContent
SearchForTag
SetBinaryContent
SortByAttribute
SortByContent
SortByTag
SortRecordsByAttribute
SortRecordsByContent
SwapNode
SwapTree
UpdateAttribute


Privacy Statement. Copyright 2000-2010 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows 7, Vista, XP, 2000, 2003 Server, and Windows 95/98/NT4.

Downloads
.NET 2.0
.NET 1.*
.NET x64
VC++ 6.0
VC++ 7.0
VC++ 8.0
Java
Ruby
Perl 5.8.*
Perl 5.10.*
Python
Bounce ActiveX
Charset ActiveX
Email ActiveX
FTP2 ActiveX
Crypt ActiveX
HTML-to-XML ActiveX
HTTP ActiveX
IMAP ActiveX
MHT ActiveX
MIME ActiveX
RSA ActiveX
Socket ActiveX
Spider ActiveX (free)
String ActiveX (free)
Tar ActiveX
Upload ActiveX (free)
XML ActiveX (free)
XMP ActiveX
Zip ActiveX