|
[h1]Document[/h1]
[h2]Properties[/h2]
[list]
[*]async
boolean: specifies whether asynchronous download of the document is permitted.
[/*][*]doctype
[/*][*]documentElement
[/*][*]implementation
[/*][*]ondataavailable [ie]
[/*][*]onreadystateChange [ie]
[/*][*]ontransformnode [ie]
[/*][*]parseError [ie]
[/*][*]preserveWhiteSpace [ie]
[/*][*]readyState
[/*][*]resolveExternals [ie]
[/*][*]setProperty ) [ie]
The following (2nd level) properties can be set: [list]
AllowDocumentFunction
[/*][*]ForcedResync
[/*][*]MaxXMLSize
[/*][*]NewParser
[/*][*]SelectionLanguage
[/*][*]SelectionNamespace
[/*][*]ServerHTTPRequest
[/*][/list]
for example:
[code]xmlDoc.setProperty("SelectionLanguage", "XPath");
selection = xmlDoc.selectNodes("//Customer");[/code]
[*]url [ie]
[/*][*]validateOnParse [ie]
[/*][/list]
[h2]Methods[/h2]
[list]
[*]abort [ie]
[/*][*]createAttribute
[/*][*]createCDATASection (data )
[/*][*]createComment (comment)
[/*][*]createDocumentFragment (data )
[/*][*]createElement (tagName)
[/*][*]createEntityReference (name )
[/*][*]createNode [ie] (type, name, nameSpaceURI)
[/*][*]createProcessingInstruction (target, data)
[/*][*]createTextNode (data)
[/*][*]getElementsByTagName (tagName)
[/*][*]load [ie] (url)
[/*][*]loadXML [ie] (xml_string)
[/*][*]nodeFromID [ie] (id_string)
[/*][*]save [ie] (objTarget)
[/*][/list]
[h1]Node[/h1]
[h2]Properties[/h2]
[list]
[*]attributes
returns an array of objects. An object in this array has the [i]name[/i] and [i]value[/i] property.
[/*][*]baseName [ie]
[/*][*]childNodes
[/*][*]dataType [ie]
[/*][*]definition [ie]
[/*][*]firstChild
[/*][*]lastChild
[/*][*]namespaceURI [ie]
[/*][*]nodeName
[/*][*]nodeType
Can be [list]
1: Element
[/*][*]2: Attribute
[/*][*]3: Text
[/*][*]4: CDATA Section
[/*][*]5: Entity Reference
[/*][*]6: Entity
[/*][*]7: Processing Instruction
[/*][*]8: Comment
[/*][*]9: Document
[/*][*]10: Document Type
[/*][*]11: Document Fragment
[/*][*]12: Notation
[/*][/list]
[*]nodeTypedValue [ie]
[/*][*]nodeTypeString [ie]
[/*][*]nodeValue
This property defines the content of a div. The following example uses nodeValue to write the seconds since the page was loaded:
<script type='text/javascript'>
var secs=0;
[url=http://www.adp-gmbh.ch/web/js/objects/window/index.html#settimeout]setTimeout[/url]('write_seconds()', 1000); // 1 second
function write_seconds() {
var span;
if (document.getElementById) {
span = document.getElementById('time');
if (span && span.firstChild && span.firstChild.nodeType == 3) {
span.firstChild.nodeValue = secs;
secs++;
}
setTimeout('write_seconds()', 1000); // 1 second
}
}
</script>
<span id='time'>0</span>
[/*][*]ownerDocument
[/*][*]parentNode
[/*][*]parsed [ie]
[/*][*]prefix
[/*][*]previousSibling [ie]
[/*][*]specified [ie]
[/*][*]text [ie]
[/*][*]xml [ie]
[/*][/list]
[h2]Methods[/h2]
[list]
[*]appendChild (tagName)
[/*][*]cloneNode (deep )
If [i]deep[/i] is true, the children and children's children are cloned as well.
[/*][*]hasChildNodes ()
[/*][*]insertBefore (newChild, refChild)
[/*][*]removeChild (child)
[/*][*]replaceChild (newChild, oldChild)
[/*][*]selectNodes [ie] (patternString)
Returns a list of nodes.
For example:
[code] xmlDoc.setProperty("SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");
xmlDoc.setProperty("SelectionLanguage", "XPath");
objNodeList = xmlDoc.documentElement.selectNodes("//xsl:template"); [/code]
[/*][*]selectSingleNode [ie] (patternString)
[/*][*]transformNode [ie] (stylesheet)
[/*][*]transformNodeToObject [ie] (stylesheet, outputObject)
[/*][/list]
[h1]Thanks[/h1]
Thanks to [b]Enrique A. Gamez[/b] who notified me of a type on this page.
|