pub struct Document { /* private fields */ }Expand description
読んだ XML の文書。元のバイト列と、要素
Implementations§
Source§impl Document
impl Document
Sourcepub fn local_name(&self, name: &Name) -> &[u8] ⓘ
pub fn local_name(&self, name: &Name) -> &[u8] ⓘ
名前の、接頭辞を除いた部分のバイト列
Sourcepub fn is(&self, name: &Name, namespace: Option<&str>, local: &[u8]) -> bool
pub fn is(&self, name: &Name, namespace: Option<&str>, local: &[u8]) -> bool
名前の名前空間が namespace(URI)で、接頭辞を除いた名前が local なら真
Sourcepub fn text(&self, range: Range<usize>) -> String
pub fn text(&self, range: Range<usize>) -> String
文字の範囲を文字にする。文字コードを戻し、改行を \n にそろえ、定義済みの実体と文字の参照を戻す。
DTD で宣言する実体の参照は、そのまま残す
Sourcepub fn cdata(&self, range: Range<usize>) -> String
pub fn cdata(&self, range: Range<usize>) -> String
<![CDATA[…]]> の内側を文字にする。文字コードを戻し、改行を \n にそろえる。参照は戻さない
Sourcepub fn value(&self, attribute: &Attribute) -> String
pub fn value(&self, attribute: &Attribute) -> String
属性の値を文字にする。Document::text に加え、XML の属性の値の正規化で、空白の文字を空白にする
Trait Implementations§
impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Forget for Document
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more