Skip to main content

DocumentType

Type Alias DocumentType 

Source
pub type DocumentType = Node<DocumentTypeSpec>;
Expand description

DocumentType node.

Aliased Type§

pub struct DocumentType { /* private fields */ }

Implementations§

Source§

impl DocumentType

Source

pub fn get_element_decl(&self, name: &str) -> Option<ElementDecl>

Lookup an element declaration whose name is name.

Source

pub fn get_attlist_decl( &self, elem_name: &str, attr_name: &str, ) -> Option<AttlistDecl>

Lookup an attribute list declaration whose element name is elem_name and attribute name is attr_name.

Source

pub fn get_entity_decl(&self, name: &str) -> Option<EntityDecl>

Lookup an entity declaration whose name is name.

Source

pub fn get_notation_decl(&self, name: &str) -> Option<NotationDecl>

Lookup a notation declaration whose name is name.

Source

pub fn name(&self) -> Rc<str>

The name of this document type node.

Source

pub fn system_id(&self) -> Option<Rc<URIStr>>

The system identifier of this document type node.

Source

pub fn public_id(&self) -> Option<Rc<str>>

The public identifier of this document type node.

Source

pub fn deep_copy(&self) -> Self

Create new node and copy internal data to the new node other than pointers to neighbor nodes and declarations.

While Clone::clone merely copies the pointer, this method copies the internal data to new memory, creating a completely different node. Comparing the source node and the new node using Node::is_same_node will always return false.

Source

pub fn deep_copy_subtree(&self) -> Result<Self, XMLTreeError>

Perform a deep copy on all descendant nodes and construct a tree with the same structure.

The link to the parent is not preserved.

Trait Implementations§

Source§

impl Display for DocumentType

Source§

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

Formats the value using the given formatter. Read more