Skip to main content

_xmlNode

Struct _xmlNode 

Source
#[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:

  • _private
  • type (also for XML_NAMESPACE_DECL)
  • name
  • children
  • last
  • parent
  • next
  • prev
  • doc

xmlNode and xmlAttr also share the ns member.

Fields§

§_private: *mut c_void

Application data. Often used by language bindings.

§type_: xmlElementType

Type enum, an xmlElementType value

§name: *const xmlChar

Name 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 _xmlNode

First child. Entity declaration of entity references.

§last: *mut _xmlNode

Last child

§parent: *mut _xmlNode

Parent node. NULL for documents or unlinked root nodes.

§next: *mut _xmlNode

Next sibling

§prev: *mut _xmlNode

Previous sibling

§doc: *mut _xmlDoc

Associated document.

Used to access DTDs, entities, ID tables, dictionary or other document properties. All children of a node share the same document.

§ns: *mut xmlNs

Namespace of element if any

§content: *mut xmlChar

Content of text, comment, PI nodes.

Sort index for elements after calling #xmlXPathOrderDocElems. Content of internal entities for entity references.

§properties: *mut _xmlAttr

First attribute of element.

Also used to store small strings with XML_PARSE_COMPACT.

§nsDef: *mut xmlNs

First namespace definition of element

§psvi: *mut c_void

For type/PSVI information

§line: c_ushort

Line number

§extra: c_ushort

Extra data for XPath/XSLT

Trait Implementations§

Source§

impl Clone for _xmlNode

Source§

fn clone(&self) -> _xmlNode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for _xmlNode

Source§

impl Debug for _xmlNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.