pub struct NamespaceModifier { /* private fields */ }👎Deprecated since 1.0.0:
使用 easyofd_package 中的命名空间工具替代
Expand description
命名空间变更器。
对应 Java: org.ofdrw.reader.tools.NameSpaceModifier
废弃:Java 原始类标记为 @Deprecated,
建议使用 easyofd_package 中的命名空间处理工具。
将 XML 内容中的非标准命名空间替换为标准 OFD 命名空间。
Implementations§
Source§impl NamespaceModifier
impl NamespaceModifier
Sourcepub fn with_namespace(namespace: impl Into<String>) -> Self
pub fn with_namespace(namespace: impl Into<String>) -> Self
使用指定命名空间创建变更器。
Sourcepub fn expected_namespace(&self) -> &str
pub fn expected_namespace(&self) -> &str
获取期望的命名空间 URI。
Sourcepub fn modify_xml(&self, xml: &str) -> String
pub fn modify_xml(&self, xml: &str) -> String
替换 XML 字符串中的命名空间声明。
将所有 xmlns:xxx="..." 声明替换为目标命名空间。
Trait Implementations§
Source§impl Clone for NamespaceModifier
impl Clone for NamespaceModifier
Source§fn clone(&self) -> NamespaceModifier
fn clone(&self) -> NamespaceModifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NamespaceModifier
impl Debug for NamespaceModifier
Auto Trait Implementations§
impl Freeze for NamespaceModifier
impl RefUnwindSafe for NamespaceModifier
impl Send for NamespaceModifier
impl Sync for NamespaceModifier
impl Unpin for NamespaceModifier
impl UnsafeUnpin for NamespaceModifier
impl UnwindSafe for NamespaceModifier
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