definition Property
A version of this page is also available for
4/8/2010
Returns the definition of the node in the document type definition (DTD) or schema.
Script Syntax
var objXMLDOMNode = oXMLDOMNode.definition;
Remarks
Script Parameters
None.
Script Return Value
Object. Returns the node that contains the definition for the entity referenced.
C/C++ Syntax
HRESULT get_definition(
IXMLDOMNode** definitionNode
);
Remarks
C/C++ Parameters
- definitionNode
[out, retval] Node that contains the definition for the entity referenced.
C/C++ Return Values
- S_OK
Value returned if successful.
- S_FALSE
Value returned when no definition is found.
- E_INVALIDARG
Value returned if definitionNode is Null.
Requirements
Header | msxml2.h, msxml2.idl |
Windows Embedded CE | Windows CE .NET 4.0 and later |
General Remarks
The definition property is not supported when using inline schemas. This behavior is by design because the node being referenced can be deleted or modified after the document is loaded, yielding unpredictable results.
This value depends on the value of the nodeType property.
Value | Description |
---|---|
NODE_ENTITY_REFERENCE |
Returns the node for the entity referenced; that is, the ENTITY element that was defined for a given ENTITYREF. Given the ENTITYREF &x;, for example, the definition property returns the node in the DOCTYPE node's entity collection that defines the corresponding ENTITY: <!ENTITY x "y">. |
NODE_ENTITY |
For unparsed entities, returns the NOTATION definition from the DOCTYPE node's notation collection. For example, given the ENTITY <!ENTITY networth SYSTEM "networth.xls" NDATA XLS>, the definition property returns the node corresponding to the notation <!NOTATION XLS PUBLIC "https://example.microsoft.com/office/excel">. For parsed entities, returns Null. |
NODE_ATTRIBUTE |
Returns the XML-Data Schema AttributeType for a given ATTRIBUTE node. For example, the definition property for the attribute myAttribute="123" returns the node corresponding to the element <AttributeType name= "myAttribute"> in the schema. Returns Null when a DTD is used or when no schema is present. |
NODE_ELEMENT |
Returns the XML-Data Schema ElementType for a given ELEMENT node. For example, given the element <myelement>, the definition property returns the node <ElementType name="myelement"> in the specified external schema. Returns Null when a DTD is used or when no schema is present. |
NODE_CDATA_SECTION, NODE_COMMENT, NODE_DOCUMENT, NODE_DOCUMENT_FRAGMENT, NODE_DOCUMENT_TYPE, NODE_NOTATION, NODE_PROCESSING_INSTRUCTION, NODE_TEXT |
Returns Null. |
The definition property is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM). The property is read-only, and applies to the following objects and interfaces:IXMLDOMAttribute, IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, DOMDocument, IXMLDOMDocumentFragment, IXMLDOMDocumentType, IXMLDOMElement, IXMLDOMEntity, IXMLDOMEntityReference, IXMLDOMNode, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, and IXTLRuntime.