4.30. Xml Namespace

The following constants are defined in the Qore namespace.

Table 4.989. XML Element Type Constants

Constant

Value

Description

XML_ELEMENT_NODE

1

Indicates an element>

XML_ATTRIBUTE_NODE

2

Indicates an attribute

XML_TEXT_NODE

3

Indicates text

XML_CDATA_SECTION_NODE

4

Indicates CDATA: unparsed character data

XML_ENTITY_REF_NODE

5

Indicates an entity reference

XML_ENTITY_NODE

6

Indicates an entity

XML_PI_NODE

7

Indicates a processing instruction

XML_COMMENT_NODE

8

Indicates a comment

XML_DOCUMENT_NODE

9

Indicates a document

XML_DOCUMENT_TYPE_NODE

10

Indicates a document type

XML_DOCUMENT_FRAG_NODE

11

Indicates a document fragment

XML_NOTATION_NODE

12

Indicates a DTD notation

XML_HTML_DOCUMENT_NODE

13

Indicates an HTML document

XML_DTD_NODE

14

Indicates a DTD

XML_ELEMENT_DECL

15

Indicates an element declaration

XML_ATTRIBUTE_DECL

16

Indicates an attribute declaration

XML_ENTITY_DECL

17

Indicates an entity declaration

XML_NAMESPACE_DECL

18

Indicates a namespace declaration

XML_XINCLUDE_START

19

Indicates an XML xinlude start element

XML_XINCLUDE_END

20

Indicates an XML xinlude end element

XML_DOCB_DOCUMENT_NODE

21

Indicates a docbook document element


The ElementTypeMap constant in Xml namespace provides a mapping between element codes and the corresponding string code as defined in the following table.

Table 4.990. ElementTypeMap Constant Hash

Key

Value

"1"

XML_ELEMENT_NODE

"2"

XML_ATTRIBUTE_NODE

"3"

XML_TEXT_NODE

"4"

XML_CDATA_SECTION_NODE

"5"

XML_ENTITY_REF_NODE

"6"

XML_ENTITY_NODE

"7"

XML_PI_NODE

"8"

XML_COMMENT_NODE

"9"

XML_DOCUMENT_NODE

"10"

XML_DOCUMENT_TYPE_NODE

"11"

XML_DOCUMENT_FRAG_NODE

"12"

XML_NOTATION_NODE

"13"

XML_HTML_DOCUMENT_NODE

"14"

XML_DTD_NODE

"15"

XML_ELEMENT_DECL

"16"

XML_ATTRIBUTE_DECL

"17"

XML_ENTITY_DECL

"18"

XML_NAMESPACE_DECL

"19"

XML_XINCLUDE_START

"20"

XML_XINCLUDE_END

"21"

XML_DOCB_DOCUMENT_NODE


Table 4.991. XML Node Type Constants

Constant

Value

Description

XML_NODE_TYPE_NONE

0

Indicates no node is available

XML_NODE_TYPE_ELEMENT

1

Indicates an XML element

XML_NODE_TYPE_ATTRIBUTE

2

Indicates an attribute node

XML_NODE_TYPE_TEXT

3

Indicates a text node

XML_NODE_TYPE_CDATA

4

Indicates a CDATA node: unparsed character data

XML_NODE_TYPE_ENTITY_REFERENCE

5

Indicates an entity reference node

XML_NODE_TYPE_ENTITY

6

Indicates an entity node

XML_NODE_TYPE_PROCESSING_INSTRUCTION

7

Indicates an XML processing instruction

XML_NODE_TYPE_COMMENT

8

Indicates an XML comment

XML_NODE_TYPE_DOCUMENT

9

Indicates a document node

XML_NODE_TYPE_DOCUMENT_TYPE

10

Indicates a document type node

XML_NODE_TYPE_DOCUMENT_FRAGMENT

11

Indicates a document fragment node

XML_NODE_TYPE_NOTATION

12

Indicates a notation node

XML_NODE_TYPE_WHITESPACE

13

Indicates a whitespace node

XML_NODE_TYPE_SIGNIFICANT_WHITESPACE

14

Indicates a significant whitespace node

XML_NODE_TYPE_END_ELEMENT

15

Indicates an end element node

XML_NODE_TYPE_END_ENTITY

16

Indicates an end entity node

XML_NODE_TYPE_XML_DECLARATION

17

Indicates an XML declaration node

The NodeTypeMap constant in Xml namespace provides a mapping between node type codes and the corresponding string code as defined in the following table.

Table 4.992. NodeTypeMap Constant Hash

Key

Value

"0"

"XML_NODE_TYPE_NONE"

"1"

"XML_NODE_TYPE_ELEMENT"

"2"

"XML_NODE_TYPE_ATTRIBUTE"

"3"

"XML_NODE_TYPE_TEXT"

"4"

"XML_NODE_TYPE_CDATA"

"5"

"XML_NODE_TYPE_ENTITY_REFERENCE"

"6"

"XML_NODE_TYPE_ENTITY"

"7"

"XML_NODE_TYPE_PROCESSING_INSTRUCTION"

"8"

"XML_NODE_TYPE_COMMENT"

"9"

"XML_NODE_TYPE_DOCUMENT"

"10"

"XML_NODE_TYPE_DOCUMENT_TYPE"

"11"

"XML_NODE_TYPE_DOCUMENT_FRAGMENT"

"12"

"XML_NODE_TYPE_NOTATION"

"13"

"XML_NODE_TYPE_WHITESPACE"

"14"

"XML_NODE_TYPE_SIGNIFICANT_WHITESPACE"

"15"

"XML_NODE_TYPE_END_ELEMENT"

"16"

"XML_NODE_TYPE_END_ENTITY"

"17"

"XML_NODE_TYPE_XML_DECLARATION"


Additionally, the classes in the following table are included in the Xml namespace.

Table 4.993. Xml Class List

Name

Description

XmlDoc

For analyzing and manipulating XML documents.

XmlNode

Gives information about XML data in an XML document.

XmlReader

For parsing or iterating through the elements of an XML document.