Namespace
Overview
XML Namespace of inline xml - as supported by the Rhino engine (but the support for direct XML inside javascript source code - as proposed by standards (Ecma-357) - is deprecated).
Properties Summarized
Properties Detailed
prefix
Identifies the prefix of this namespace, if applicable.
Type String
Sample
var xmlElement = <xhtml:p xmlns:xhtml="http://www.w3.org/1999/xhtml">Hello World!</xhtml:p>;
var namespace = xmlElement.namespace();
application.output("Prefix: " + namespace.prefix); //will output: 'xhtml'
application.output("URI: " + namespace.uri); //will output: 'http://www.w3.org/1999/xhtml'
uri
Identifies the namespace of this Namespace, if applicable.
Type String
Sample
var xmlElement = <xhtml:p xmlns:xhtml="http://www.w3.org/1999/xhtml">Hello World!</xhtml:p>;
var namespace = xmlElement.namespace();
application.output("Prefix: " + namespace.prefix); //will output: 'xhtml'
application.output("URI: " + namespace.uri); //will output: 'http://www.w3.org/1999/xhtml'
Last updated
Was this helpful?