Click to return to the XML (Extensible Markup Language) home page    
XMLDOMNode selectSingleNo...     XMLDOMNode text Property     XMLDOMNode Object    
Web Workshop  |  XML (Extensible Markup Language)

specified Property


Indicates whether the node (usually an attribute) is explicitly specified or derived from a default value in the DTD or schema.

Syntax

boolValue = oXMLDOMNode.specified

Remarks

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 (document type definition) 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.

Example

The following 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("microsoft.xmldom")
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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMAttribute, XMLDOMCDATASection, XMLDOMCharacterData, XMLDOMComment, XMLDOMDocument, XMLDOMDocumentFragment, XMLDOMDocumentType, XMLDOMElement, XMLDOMEntity, XMLDOMEntityReference, XMLDOMNode, XMLDOMNotation, XMLDOMProcessingInstruction, XMLDOMText, XTLRuntime


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.