WriteNamespace() public method

This is used to write the namespace to the element. This will write the special attribute using the prefix and reference specified. This will escape the reference if it is required.
public WriteNamespace ( String reference, String prefix ) : void
reference String /// This is the namespace URI reference to use. ///
prefix String /// This is the prefix to used for the namespace. ///
return void
Esempio n. 1
0
        /// <summary>
        /// This is used to write the namespaces of the specified node to
        /// the output. This will iterate over each namespace entered on
        /// to the node. Once written the node is considered qualified.
        /// </summary>
        /// <param name="node">
        /// this is the node to have is attributes written
        /// </param>
        public void WriteNamespaces(OutputNode node)
        {
            NamespaceMap map = node.getNamespaces();

            for (String name : map)
            {
                String prefix = map.get(name);
                writer.WriteNamespace(name, prefix);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// This is used to write the namespaces of the specified node to
        /// the output. This will iterate over each namespace entered on
        /// to the node. Once written the node is considered qualified.
        /// </summary>
        /// <param name="node">
        /// This is the node to have is attributes written.
        /// </param>
        public void WriteNamespaces(OutputNode node)
        {
            NamespaceMap map = node.Namespaces;

            foreach (String name in map.References)
            {
                String prefix = map.Get(name);
                writer.WriteNamespace(name, prefix);
            }
        }