Indicates whether the node (usually an attribute) is explicitly specified or derived from a default value in the DTD or schema.
boolValue = oXMLDOMNode.specified
Boolean. The property is read-only. Returns True if the attribute is explicitly specified in the element. Returns False if the attribute value comes from the DTD or schema.
This value depends on the value of the nodeType property.
NODE_ATTRIBUTE | Returns True if the attribute was specified directly on the element. Returns False for default attributes. |
NODE_CDATA_SECTION, NODE_COMMENT, NODE_DOCUMENT, NODE_DOCUMENT_FRAGMENT, NODE_DOCUMENT_TYPE, NODE_ELEMENT, NODE_ENTITY, NODE_ENTITY_REFERENCE, NODE_NOTATION, NODE_PROCESSING_INSTRUCTION, NODE_TEXT | Returns True. |
This member is an extension of the W3C DOM.
The following VBScript example creates an XMLDOMNode object from the specified item in an XMLDOMNamedNodeMap. It then displays whether or not the attribute was specified in the element rather than in a DTD or schema:
Dim xmlDoc Dim currNode Dim objNamedNodeMap Dim myNode Set xmlDoc = CreateObject("Msxml2.DOMDocument") xmlDoc.async = False xmlDoc.load("c:\books.xml") Set currNode = xmlDoc.documentElement.childNodes.item(0) Set objNamedNodeMap = currNode.attributes Set myNode = objNamedNodeMap.item(0) MsgBox myNode.specified
Applies To: XMLDOMAttribute Object | XMLDOMCDATASection Object | XMLDOMCharacterData Object | XMLDOMComment Object | DOMDocument Object | XMLDOMDocumentFragment Object | XMLDOMDocumentType Object | XMLDOMElement Object | XMLDOMEntity Object | XMLDOMEntityReference Object | XMLDOMNode Object | XMLDOMNotation Object | XMLDOMProcessingInstruction Object | XMLDOMText Object | XTLRuntime Object