| | DocumentProperties- 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: - AllowDocumentFunction
- ForcedResync
- MaxXMLSize
- NewParser
- SelectionLanguage
- SelectionNamespace
- ServerHTTPRequest
for example:
xmlDoc.setProperty("SelectionLanguage", "XPath"); selection = xmlDoc.selectNodes("//Customer"); url [ie] validateOnParse [ie] Methods- 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)
NodeProperties- attributes
returns an array of objects. An object in this array has the name and value property. - baseName [ie]
- childNodes
- dataType [ie]
- definition [ie]
- firstChild
- lastChild
- namespaceURI [ie]
- nodeName
- nodeType
Can be - 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
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; setTimeout('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] Methods- appendChild (tagName)
- cloneNode (deep )
If deep 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:
xmlDoc.setProperty("SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"); xmlDoc.setProperty("SelectionLanguage", "XPath"); objNodeList = xmlDoc.documentElement.selectNodes("//xsl:template"); - selectSingleNode [ie] (patternString)
- transformNode [ie] (stylesheet)
- transformNodeToObject [ie] (stylesheet, outputObject)
ThanksThanks to Enrique A. Gamez who notified me of a type on this page. |