
| Node Type | Example |
|---|---|
| Document Type | <!DOCTYPE food SYSTEM "food.dtd"> |
| Processing Instructions | <?xml version = "1.0"?> |
| Element | <drink type = "beer">CarlsBerg</drink> |
| Attribute | type = "beer" |
| Text | CarlsBerg |
<SCRIPT Type = "Text/JavaScript">
ObjectName = new ActiveXObject("Microsoft.XMLDOM")
ObjectName.async = "false"
ObjectName.load("filename.xml")
// Processing Goes Here //
</SCRIPT>
<SCRIPT Type = "Text/JavaScript">
var text = "<note>"
text = text + "<to>Bob</to><from>Bill</from>"
text = text + "<heading>Reminder</heading>"
text = text + "<body>Don't forget me this weekend</body>"
text = text + "</noteto>"
</SCRIPT>
| Property | Description |
|---|---|
| [ObjectName].ParseError.ErrorCode | Numeric Error Code |
| [ObjectName].ParseError.Reason | String Error Reason |
| [ObjectName].ParseError.Line | LInt Error Line Number |
| [ObjectName].ParseError.LinePos | LInt Error Line Position |
| [ObjectName].ParseError.SrcText | String Error Line of Code |
| [ObjectName].ParseError.URL | URL Pointing to the Document |
| [ObjectName].ParseError.FilePos | LInt Error File Position |
XMLDoc = CreateObject("Microsoft.XMLDOM")
XMLDoc.async = "false"
XMLDoc.load("FileName.xml")
For Each X in XMLDoc.documentElement.childNodes
Document.Write(X.nodename & ' ' & X.text)
Next X
XMLDoc = new ActiveXObject("Microsoft.XMLDOM")
XMLDoc.async = "false"
XMLDoc.load("FileName.xml")
HTMLObjectName.innerText = XMLDoc.getElementsByTagName("tag").item(n).text
XMLDoc = CreateObject("Microsoft.XMLHTTP")
XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP")
XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP")
XMLHTTP.open("GET", "FileName", false)
XMLHTTP.send()
XMLDoc = XMLHTTP.responseText
XMLHTTP = new XMLHttpRequest();
XMLHTTP.open("GET", "FileName", false);
XMLHTTP.send(null);
XMLDoc = XMLHTTP.responseText;
XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP")
XMLHTTP.open("POST", "FileName.asp", false)
XMLHTTP.send(XMLDoc)
XMLDocResponse = XMLHTTP.responseText
XMLDOC = Server.CreateObject("Microsoft.XMLDOM")
XMLDOC.async = false
XMLDOC.load(request)
For Each X in XMLDOC.documentElement.childNodes
if X.NodeName = "TagName" then name = X.Text
Next
Response.Write(name)
| Property | Description |
|---|---|
| readyState | Returns the State of the Document |
| responseBody | Returns the response as an array of Unsigned Bytes |
| responseStream | Returns the response as an IStream |
| responseText | Returns the response as a String |
| responseXML | Returns the response as an XML Document |
| status | Returns the Status Code as a Number |
| statusText | Returns the Status as a String |
| Method | Description |
|---|---|
| abort() | Cancels the Current HTTP Request |
| getAllResponseHeaders() | Returns the Value of the HTTP Headers |
| getResponseHeader(headerName) | Returns the Value of a specified HTTP Header |
| Open(method,url,async,uerid,password) | Opens an HTTP Request |
| send() | Sends the HTTP Request to the Server |
| setRequestHeader(headerName,headerValue) | Specifies the Name of an HTTP Header |
| nodeType | nodeTypeString | nodeName | nodeValue |
|---|---|---|---|
| 1 | element | tagName | null |
| 2 | attribute | name | value |
| 3 | text | #text | content of node |
| 4 | cdatasection | #cdata-section | content of node |
| 5 | entityreference | entity reference name | null |
| 6 | entity | entity name | null |
| 7 | processinginstruction | target | content of node |
| 8 | comment | #comment | comment text |
| 9 | document | #document | null |
| 10 | documenttype | doctype name | null |
| 11 | documentfragment | #document fragment | null |
| 12 | notation | notation name | null |
| NodeType | Named Constant |
|---|---|
| 1 | ELEMENT_NODE |
| 2 | ATTRIBUTE_NODE |
| 3 | TEXT_NODE |
| 4 | CDATA_SECTION_NODE |
| 5 | ENTITY_REFERENCE_NODE |
| 6 | ENTITY_NODE |
| 7 | PROCESSING_INSTRUCTION_NODE |
| 8 | COMMENT_NODE |
| 9 | DOCUMENT_NODE |
| 10 | DOCUMENT_TYPE_NODE |
| 11 | DOCUMENT_FRAGMENT_NODE |
| 12 | NOTATION_NODE |
| Property | Description |
|---|---|
| attributes | Returns a NamedNodeMap containing all node attributes |
| childNodes | Returns a NodeList containing all child nodes |
| firstChild | Returns the nodes' first child node |
| lastChild | Returns the nodes' last child node |
| nextSibling | Returns the nodes' next sibling node |
| nodeName | Returns the Node Name, depending on the type |
| nodeType | Returns the node type as a number |
| ownerDocument | Returns the nodes' root node |
| parentNode | Returns the nodes' parent node |
| previousSibling | Returns the nodes' previous sibling node |
| basename | Returns the nodeName without the namespaces |
| dataType | Sets/Returns the nodes' data type |
| definition | |
| nodeTypeString | Returns the node type as a string |
| nodeTypedValue | |
| specified | Returns if the nodeValue is specified in the DTD/Schema |
| text | Sets/Returns nodes' text and all of it's child nodes |
| xml | Sets/Returns nodes' xml and for all it's child nodes |
| Method | Description |
|---|---|
| appendChild(newChild) | Appends node newChild after last childNode |
| cloneNode(boolean) | Returns exact clone
if boolean = true, all childNodes are cloned too |
| inserBefore(newNode,refNode) | Inserts newNode before refNode |
| removeChild(nodeName) | Removes childNode nodeName |
| replaceChild(newNode,oldNode) | Replaces childNode oldNode with newNode |
| selectNodes(pattern) | |
| selectSingleNode(pattern) | |
| transformNode(stylesheet) | Processes the node and childNodes with XSL stylesheet
and returns the result |
| Property | Description |
|---|---|
| length | Number of Nodes |
| nextNode() | Returns the next object in the node list |
| reset() | Resets the pointer to the first node |
| Method | Description |
|---|---|
| item | Returns specific node in the nodelist |
| Property | Description |
|---|---|
| documentElement | Root Element of the Document |
| doctype | Returns the DTD or Schema for the document |
| implementation | Returns the implementation object for this document |
| Method | Description |
|---|---|
| createAttribute(attributeName) | Creates an attribute node with the specified name |
| createCDATASection(text) | Creates CDATA section with specified text |
| createComment(text) | Creates comment section with the specified text |
| createDocumentFragment() | Creates an empty documentFragment object |
| createElement(tagName) | Creates an Element with the Specified Tag Name |
| createEntityReference(referenceName) | Creates an entityReference with the specified name |
| createProcessingInstruction(target,text) | Creates a processingInstruction node
with the specified target and text |
| createTextNode(text) | Creates a text node, containing the text |
| getElementByTagName(tagName) | Returns specified node and it's c
hildNodes as a nodelist |
| Property | Description |
|---|---|
| tagName | Sets/Returns the Name of the Node |
| Method | Description |
|---|---|
| getAttribute(attributeName) | Returns the Value of the Specified Attribute |
| getAttributeNode(attributeName) | Returns the specified attribute node as an Object |
| getElementsByTagName(tagName) | Returns the specified Node
and it's childNodes as a Nodelist |
| normalize() | Puts the text nodes for this element and it's
child nodes into one text node |
| removeAttribute(attributeName) | Removes the specified attributes value
Restores Default value if it exists |
| removeAttributeNode(attributeNode) | Removes the specified attribute node |
| setAttribute(attributeName,attributeValue) | Inserts a new Attribute |
| setAttributeNode(attributeNodeName) | Inserts new Attribute Node |
| Property | Description |
|---|---|
| name | Sets/Returns the Attributes Nname |
| specified | Returns boolean indicating if the node's
value is set in the document |
| value | Sets/Returns the Attributes value |
| Method | Description |
|---|---|
| splitText(n) | Splits the text of the specified character
and returns the rest of the text |

|
|
|