Trait xml_dom::level2::ProcessingInstruction[][src]

pub trait ProcessingInstruction: Node {
    fn length(&self) -> usize { ... }
fn data(&self) -> Option<String> { ... }
fn set_data(&mut self, data: &str) -> Result<()> { ... }
fn unset_data(&mut self) -> Result<()> { ... }
fn target(&self) -> String { ... } }

This corresponds to the DOM ProcessingInstruction interface.

Specification

The ProcessingInstruction interface represents a “processing instruction”, used in XML as a way to keep processor-specific information in the text of the document.

Provided methods

fn length(&self) -> usize[src]

The number of 16-bit units that are available through data.

fn data(&self) -> Option<String>[src]

The content of this processing instruction.

Specification

This is from the first non white space character after the target to the character immediately preceding the '?>'.

Exceptions on setting

  • NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

fn set_data(&mut self, data: &str) -> Result<()>[src]

Set the data for the node; see data.

fn unset_data(&mut self) -> Result<()>[src]

Set the data for the node to None; see data.

fn target(&self) -> String[src]

The target of this processing instruction.

Specification

XML defines this as being the first token following the markup that begins the processing instruction.

Loading content...

Implementors

Loading content...