Sometimes XML contains namespaces that make XML operations inconvenient. You can remove the built-in functions of the XML class using the following method:
Removenamespace (NS: namespace
): XML
Delete the specified namespace of the object and all its sub-levels. If the namespace is referenced by the qualified name of the object or the qualified name of the object property
Removenamespaces ()
Method does not delete the namespace.
Example:
VaR XML: xml =
<RDF: RDF xmlns: RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns"
Xmlns: DC = "http://purl.org/dc/elements/1.1"
Xmlns = "http://purl.org/rss/1.0/">
<! --... -->
</RDF: RDF>;
Trace (XML. namespacedeclarations (). Length); // 3
Trace (XML. namespacedeclarations () [0] is string );//
VaR DC: namespace = xml. namespace ("DC ");
XML. removenamespace (DC );
Trace (XML. namespacedeclarations (). Length); // 2