FOM Reference > DOM Support > XPath Extensions > fxAttribute interface
  
fxAttribute interface
The 3b2 extension to the W3C DOM Level 2 Attribute interface.
xmlAttributeDeclarationType enumeration
The DTD Attribute Declaration node type.
The xmlAttributeDeclarationType enumeration has the following constants of type unsigned short.
DECLARATION_TYPE_INIT = 0
Initialisation value.
DECLARATION_TYPE_CDATA = 1
The CDATA attribute declaration type.
DECLARATION_TYPE_ID = 2
The ID attribute declaration type.
DECLARATION_TYPE_IDREF = 3
The IDREF attribute declaration type.
DECLARATION_TYPE_IDREFS = 4
The IDREFS attribute declaration type.
DECLARATION_TYPE_ENTITY = 5
The ENTITY attribute declaration type.
DECLARATION_TYPE_ENTITIES = 6
The ENTITIES attribute declaration type.
DECLARATION_TYPE_NMTOKEN = 7
The NMTOKEN attribute declaration type.
DECLARATION_TYPE_NMTOKENS = 8
The NMTOKENS attribute declaration type.
DECLARATION_TYPE_ENUMERATION = 9
The type for an enumerated list of attribute values.
DECLARATION_TYPE_NOTATION = 10
The NOTATION attribute declaration type.
attributeDeclarationType attribute
See xmlAttributeDeclarationType above for values.
attributeDeclarationType
Access
read-only
Returns
unsigned short
endContent attribute
Returns the content end position of the fxAttribute node in a XML stream.
endContent
Access
read-only
Returns
int
endPosition attribute
Returns the end position of the fxAttribute node in a XML stream.
endPosition
Access
read-only
Returns
int
extendedNodeType attribute
The 3b2 extension to the W3C DOM Level 2 xmlNode interface.
extendedNodeType
Access
read-only
Returns
unsigned short
namespacesInScope attribute
Pointer to associated namespace.
namespacesInScope
Access
read-only
Returns
fArray
nodeNumber attribute
Returns the id number of the fxAttribute node in a XML stream.
nodeNumber
Access
read-only
Returns
int
significantWhitespace attribute
3b2 node information ( x3b2NodeInfo) for handling whitespace.
significantWhitespace
Access
read-only
Returns
int
startContent attribute
Returns the content start position of the fxAttribute node in a XML stream.
startContent
Access
read-only
Returns
int
startPosition attribute
Returns the start position of the fxAttribute node in a XML stream.
startPosition
Access
read-only
Returns
int
validAttributes attribute
Uses the DTD to return the valid attributes of a fxAttribute node.
validAttributes
Access
read-only
Returns
String
validContent attribute
Uses the DTD to return the valid content of the fxAttribute node.
validContent
Access
read-only
Returns
String
evaluateXPath method
Evaluates an XPath expression string.
evaluateXPathexpression
Parameters
Stringexpression
The XPath expression string to be parsed and evaluated.
Returns
XPathResult. The XPathResult of the evaluation of the XPath expression.
Throws
XPathException
INVALID_EXPRESSION_ERR: Raised if the expression is not legal according to the rules of the XPathEvaluator.
getNodePath method
Returns an absolute location path for the xmlNode.
getNodePathmode
Parameters
intmode
If not specified, or 0, the returned path uses expanded local-name and namespace-uri syntax for elements within namespaces.
If 1, the returned path uses the specifed prefix on elements within a namespace.
mode 0: /document/chapter[1]/section[5]/node()[ local-name()="title" and namespace-uri()="URN:example:urn" ]
mode 1: /document/chapter[1]/section[5]/ex:title
Returns
String. Returns the absolute location path to this xmlNode.
getPage method
 
getPage
Parameters
None
Returns
fPage
getUserString method
Retrieves the string associated to a key on the xmlNode. The string must first have been set to this node by calling setUserString with the same key.
getUserStringkey
Parameters
Stringkey
The key to the associated string.
Returns
String. The userString associated to the given key on this xmlNode, or NULL if there was none.
getXmlBase method
Used to search for the base URI for this xmlNode. It does not return the base URI for the document.
getXmlBase
Parameters
None
Returns
String. Returns the base URI string.
getXmlLang method
The default definition. This function normally searches for the language of the xmlElement node. This can not be set for the base xmlNode - the relevant derived class will redefine this function to set it.
getXmlLang
Parameters
None
Returns
String. In the default definition, returns an empty string.
getXmlSpace method
The default definition. This function normally searches for the space preserving behaviour of an xmlElement. This can not be set for the base xmlNode - the relevant derived classes will redefine this function to set it.
getXmlSpace
Parameters
None
Returns
String. In the default definition, returns -1.
hasNamespacesInScope method
Used to see if this node has a list of namespaces.
hasNamespacesInScope
Parameters
None
Returns
booleantrue if this node has a list of namespaces, false otherwise.
lookupNamespacePrefix method
Returns the URI associated with the prefix passed in. If the prefix is not associated with a namespace, or a prefix is not passed in, the method returns null.
lookupNamespacePrefixprefix
Parameters
Stringprefix
The prefix to search for.
Returns
String. Returns the associated namespace URI or null if none is found.
setUserString method
Used to set the userString for a specific xmlNode.
setUserStringkeydata
Parameters
Stringkey
The key to associate the string to.
Stringdata
The string to associate to the given key, or NULL to remove any existing association to that key
Returns
String. The string previously associated to the given key on this node, or NULL if there was none.