Async attributes
The async attribute indicates whether asynchronous download is allowed.
Basic syntax boolValue = XMLDocument. async; XMLDocument. async = boolValue;
The Boolean value is writable (read/write). If asynchronous download is allowed, the value is True; otherwise, the value is False.
Example
Webjx. Com
XmlDoc. async = "false ";
Alert (xmlDoc. async); webpage tutorial Network
========================================================== ==========
Attribute webpage tutorial Network
Returns the attribute list of the current node.
Basic syntax objAttributeList = xmlNode. attributes;
Returns an object. If this node cannot contain attributes, a null value is returned.
Example
ObjAttList = xmlDoc.doc umentElement. attributes;
Alert (objAttList );
Webpage tutorial Network
========================================================== ==========
Webpage tutorial Network
ChildNodes attributes
A list of available sub-nodes of the node.
Basic syntax objNodeList = node. childNodes;
Returns an object. If this node does not have a subnode, null is returned.
Example
ObjNodeList = xmlDoc. childNodes;
Alert (objNodeList );
========================================================== ==========
Doctype attribute Webjx. Com
File Type node, including the DTD of the current file. This node is a general file type declaration. For example, the Node object named "EMAIL" will be returned.
Basic Syntax: objdoctypew.xmldocument.doc type;
It indicates that an object is returned. This attribute is read-only. If this file does not contain a DTD, null is returned.
Example
Webpage tutorial Network
ObjDocType = xmlDoc.doc type;
Alert (objDocType. nodeName );
========================================================== ==========
Webjx. Com
DocumentElement attributes
Webpage tutorial Network
As the Root node of the validation XML file.
Basic syntax objdoc1_xmldocument.doc umentElement;
It refers to an object that contains data in a single root file element. This attribute is readable/written. If the file does not contain the root node, null is returned.
Example: Webjx. Com
ObjDocRoot = xmlDoc.doc umentElement;
Alert (objDocRoot );
========================================================== ========== Web teaching network
FirstChild attributes
The first child element in the current node.
Basic syntax objFirstChild = xmlDocNode. firstChild;
This attribute is read-only and an object is returned. If the node does not contain the first child element, null is returned.
Tutorial webpage tutorial Network
ObjFirstChild = xmlDoc.doc umentElement. firstChild;
Alert (objFirstChild); Webjx. Com
========================================================== ==========
Implementation attributes
Webjx. Com
DOM applications can use objects in other implementations. The implementation attribute confirms the DOMimplementation object of the current XML file.
Basic syntax objImplementation = xmlDocument. implementation;
This attribute is read-only and returns an object.
Example
ObjImp = xmlDoc. implementation;
Alert (objImp );
========================================================== ========== Web teaching network
LastChild attribute Webjx. Com
Used to confirm the final child element of the current node.
Basic syntax objLastChild = xmlDocNode. lastChild;
This attribute is read-only and returns an object. If the node does not contain the last child element, null is returned.
Example
ObjLastChild = xmlDoc.doc umentElement. lastChild;
Alert (objLastChild );
========================================================== ========== Web teaching network
NextSibling attributes
In the subnode list of the current file node.
Basic syntax objNextSibling = xmlDocNode. nextSibling;
This attribute is read-only and returns an object. If the node does not contain any other related node, null is returned.
Example
Webjx. Com
ObjSibling = xmlDoc.doc umentElement. childNodes. item (1). nextSibling;
Alert (objSibling );
========================================================== ==========
NodeName attribute Webjx. Com
Returns the string representing the current node name.
Basic syntax strNodeName = xmlDocNode. nodeName;
Returns a string. This attribute is read-only and returns the element name, attribute, or object reference.
Tutorial webpage tutorial Network
StrNodeName = xmlDoc.doc umentElement. nodeName;
Alert (strNodeName );
Webpage tutorial Network
========================================================== ========= Webjx. com
NodeType attributes
Webjx. Com
Identifies the DOM type of a node.
Basic syntax numNodeType = xmlDocNode. nodeType;
This attribute is read-only and returns a value.
Webpage tutorial Network
Valid values are of the following types:
1-ELEMENT
2-ATTRIBUTE
3-TEXT
4-CDATA
5-ENTITY REFERENCE
6-ENTITY
7-PI (processing instruction)
8-COMMENT
9-DOCUMENT
10-DOCUMENT TYPE
11-DOCUMENT FRAGMENT
12-NOTATION
Example: Webjx. Com
NumNodeType = xmlDoc.doc umentElement. nodeType;
Alert (numNodeType );
========================================================== ==========
NodeValue attributes
Used to return text related to a specified node. This is not a data value in an element, but a node-related and unparsed text, just like an attribute or a processing command.
Basic syntax varNodeValue = xmlDocNode. nodeValue;
The returned text represents the type value based on the node's nodeType attribute. (See the nodeType attribute in the appendix .) Because the node type may be one of several data types, the return value is also different. The node types that return null include DOCUMENT, ELEMENT, document type, document fragment, ENTITY, entity reference, and NOTATION. This attribute can be erased.
Example: Webjx. Com
VarNodeValue = xmlDoc.doc umentElement. nodeValue;
Alert (varNodeValue );
Webpage tutorial Network
========================================================== ==========
Webjx. Com
Ondataavailable attributes
Webpage tutorial Network
Specifies an event to process the ondataavailable event.
Basic syntax xmlDocNode. ondataavailable = value;
This attribute is write-only. Once the data of the file author is available, the data can be used for operation as soon as possible.
Example
XmlDoc. ondataavailable = alert ("Data is now available .");
========================================================== ==========
Onreadystatechange attribute webpage
Specifies an event to process the onreadystatechange event. This event can identify changes to the readyState attribute.
Basic syntax xmlDocNode. onreadystatechange = value;
This attribute is write-only and allows the file author to specify the call event when the readyState attribute changes.
Example
XmlDoc. onreadystatechange = alert ("The readyState property has changed .");
========================================================== ==========
OwnerDocument attribute Webjx. Com
The root node used to return the file, including the current node.
Basic syntax objOwnerDoc = xmlDocument. ownerDocument;
This attribute is read-only and returns an object containing the root node of the file, containing a specific node.
Example: Webjx. Com
ObjOwnerDoc = xmlDoc. childNodes. item (2). ownerDocument;
Alert (objOwnerDoc); Webjx. Com
========================================================== ==========
ParentNode attributes
Webjx. Com
Returns the parent node of the current node. It can only be applied to nodes with a parent node.
Basic Syntax: objParentNode = xmlDocumentNode. parentNode;
This attribute is read-only and returns the parent node object containing the specified node. If the node does not exist in the file tree, null is returned.
Example: Webjx. Com
ObjParentNode = xmlDoc. childNodes. item (1). parentNode;
Alert (objParentNode); Webjx. Com
========================================================== ==========
ParseError attribute webpage
Return a DOM parsing error object, which describes the final parsing error message.
Basic syntax objParseErr = xmlDocument. parseError;
This attribute is read-only. If no error occurs, 0 is returned.
Example
ObjParseErr = xmlDoc. parseError;
Alert (objParseErr );
========================================================== ==========
Webjx. Com
Previussibling attributes
Used to return back to the brother node before the current node.
Basic syntax objPrevSibling = xmlDocument. previussibling;
It indicates that an object is returned. This attribute is read-only. If the node does not contain the previous sibling node, null is returned.
Tutorial webpage tutorial Network
ObjPrevSibling = xmlDoc.doc umentElement. childNodes. item (3). previousSibling;
Alert (objPrevSibling); web teaching network
========================================================== ==========
Webjx. Com
ReadyState attribute Webjx. Com
The current situation of the XML file.
Basic syntax intState = xmlDocument. readyState;
This attribute is read-only and the returned value may be:
0-UNINITIALIZED: XML objects are generated, but no files are loaded.
1-LOADING: The LOADING program is in progress, but the file has not started parsing.
2-LOADED: some files have been LOADED and parsed, but the object model has not yet taken effect.
3-INTERACTIVE: only valid for some loaded files. In this case, the object model is valid but read-only.
4-COMPLETED: the file is fully loaded, indicating that the file is successfully loaded.
Example: Webjx. Com
Alert ("The readyState property is" + xmlDoc. readyState );
Webpage tutorial Network
========================================================== ==========
Url attributes
Returns the URL of the last XML file to be loaded.
Basic syntax strDocUrl = xmlDocument. url;
This attribute is read-only and returns the URL of the last successfully loaded file. If the file only exists in the primary storage (indicating that the file is not loaded by an external file), null is returned.
Example
Alert (xmlDoc. url); Webjx. Com
========================================================== ==========
ValidateOnParse attributes
Used to tell the parser whether the file is valid.
Basic Syntax: boolValidate = xmlDocument. validateOnParse; xmlDocument. validateOnParse = boolValidate;
This attribute can be erased. If the return value is true, the file is confirmed to be valid when it is parsed. If false is returned, the file is invalid and is considered to be a standard (well-formed) file.
Example
XmlDoc. validateOnParse = true;
Alert (xmlDoc. validateOnParse); webpage tutorial Network
========================================================== ==========
Xml attributes
Returns the XML Description of the specified node and all child nodes.
Basic syntax xmlValue = xmlDocumentNode. xml;
This attribute is read-only.
Example
Webpage tutorial Network
XmlValue = xmlDoc.doc umentElement. xml;
Alert (xmlValue );