#[repr(C)]pub struct _xmlNode {Show 16 fields
pub _private: *mut c_void,
pub type_: xmlElementType,
pub name: *const xmlChar,
pub children: *mut _xmlNode,
pub last: *mut _xmlNode,
pub parent: *mut _xmlNode,
pub next: *mut _xmlNode,
pub prev: *mut _xmlNode,
pub doc: *mut _xmlDoc,
pub ns: *mut xmlNs,
pub content: *mut xmlChar,
pub properties: *mut _xmlAttr,
pub nsDef: *mut xmlNs,
pub psvi: *mut c_void,
pub line: c_ushort,
pub extra: c_ushort,
}Expand description
Generic node type in an XML or HTML tree.
This is used for
- XML_ELEMENT_NODE
- XML_TEXT_NODE
- XML_CDATA_SECTION_NODE
- XML_ENTITY_REF_NODE
- XML_PI_NODE
- XML_COMMENT_NODE
- XML_DOCUMENT_FRAG_NODE
- XML_XINCLUDE_START_NODE
- XML_XINCLUDE_END_NODE
Other node types have a different struct layout than xmlNode, see xmlElementType. Except for XML_NAMESPACE_DECL all nodes share the following members at the same offset:
_privatetype(also for XML_NAMESPACE_DECL)namechildrenlastparentnextprevdoc
xmlNode and xmlAttr also share the ns member.
Fields§
§_private: *mut c_voidApplication data. Often used by language bindings.
type_: xmlElementTypeType enum, an xmlElementType value
name: *const xmlCharName of the node.
- Local name of elements or attributes. As a corner case, this can also contain Names which are invalid QNames in non-namespace-wellformed documents.
- Name of entity references
- Target of processing instructions
- Fixed string for text and comments
- Unused otherwise
children: *mut _xmlNodeFirst child. Entity declaration of entity references.
last: *mut _xmlNodeLast child
parent: *mut _xmlNodeParent node. NULL for documents or unlinked root nodes.
next: *mut _xmlNodeNext sibling
prev: *mut _xmlNodePrevious sibling
doc: *mut _xmlDocAssociated document.
Used to access DTDs, entities, ID tables, dictionary or other document properties. All children of a node share the same document.
ns: *mut xmlNsNamespace of element if any
content: *mut xmlCharContent of text, comment, PI nodes.
Sort index for elements after calling #xmlXPathOrderDocElems. Content of internal entities for entity references.
properties: *mut _xmlAttrFirst attribute of element.
Also used to store small strings with XML_PARSE_COMPACT.
nsDef: *mut xmlNsFirst namespace definition of element
psvi: *mut c_voidFor type/PSVI information
line: c_ushortLine number
extra: c_ushortExtra data for XPath/XSLT