## org.apache.batik.dom.util
Class DOMUtilities

    java.lang.Object
      org.apache.batik.xml.XMLCharacters
          org.apache.batik.xml.XMLUtilities
              org.apache.batik.dom.util.DOMUtilities

public class DOMUtilities
extends XMLUtilities

A collection of utility functions for the DOM.

Field Summary

Fields inherited from class org.apache.batik.xml.XMLCharacters
`ALPHABETIC_CHARACTER, NAME_CHARACTER, NAME_FIRST_CHARACTER, PUBLIC_ID_CHARACTER, VERSION_CHARACTER, XML_CHARACTER`

Constructor Summary
`protected` `DOMUtilities()` Do not need to be instantiated.

Method Summary
`static java.lang.String` `contentToString(java.lang.String s)` Returns the given content value transformed to replace invalid characters with entities.
`static org.w3c.dom.Document` `deepCloneDocument(org.w3c.dom.Document doc, org.w3c.dom.DOMImplementation impl)` Deep clones a document using the given DOM implementation.
`static java.lang.String` `getLocalName(java.lang.String s)` Gets the local name from the given qualified name.
`static java.lang.String` `getPrefix(java.lang.String s)` Gets the prefix from the given qualified name.
`static boolean` `isValidName(java.lang.String s)` Tests whether the given string is a valid name.
`static boolean` `isValidPrefix(java.lang.String s)` Tests whether the given string is a valid prefix.
`static void` `parseStyleSheetPIData(java.lang.String data, HashTable table)` Parses a 'xml-stylesheet' processing instruction data section and puts the pseudo attributes in the given table.
`static void` `writeDocument(org.w3c.dom.Document doc, java.io.Writer w)` Writes the given document using the given writer.
`static void` `writeNode(org.w3c.dom.Node n, java.io.Writer w)` Writes a node using the given writer.

Methods inherited from class org.apache.batik.xml.XMLUtilities
`createXMLDeclarationReader, createXMLDocumentReader, encodingToJavaEncoding, getXMLDeclarationEncoding, isXMLAlphabeticCharacter, isXMLCharacter, isXMLNameCharacter, isXMLNameFirstCharacter, isXMLPublicIdCharacter, isXMLSpace, isXMLVersionCharacter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DOMUtilities

    protected DOMUtilities()

  Do not need to be instantiated.

Method Detail

### writeDocument

    public static void writeDocument(org.w3c.dom.Document doc,
                                     java.io.Writer w)
                              throws java.io.IOException

  Writes the given document using the given writer.

  Throws:
    `java.io.IOException`

### writeNode

    public static void writeNode(org.w3c.dom.Node n,
                                 java.io.Writer w)
                          throws java.io.IOException

  Writes a node using the given writer.

  Throws:
    `java.io.IOException`

### contentToString

    public static java.lang.String contentToString(java.lang.String s)

  Returns the given content value transformed to replace invalid characters with entities.

### deepCloneDocument

    public static org.w3c.dom.Document deepCloneDocument(org.w3c.dom.Document doc,
                                                         org.w3c.dom.DOMImplementation impl)

  Deep clones a document using the given DOM implementation.

### isValidName

    public static boolean isValidName(java.lang.String s)

  Tests whether the given string is a valid name.

### isValidPrefix

    public static boolean isValidPrefix(java.lang.String s)

  Tests whether the given string is a valid prefix. This method assume that isValidName(s) is true.

### getPrefix

    public static java.lang.String getPrefix(java.lang.String s)

  Gets the prefix from the given qualified name. This method assume that isValidName(s) is true.

### getLocalName

    public static java.lang.String getLocalName(java.lang.String s)

  Gets the local name from the given qualified name. This method assume that isValidName(s) is true.

### parseStyleSheetPIData

    public static void parseStyleSheetPIData(java.lang.String data,
                                             HashTable table)

  Parses a 'xml-stylesheet' processing instruction data section and puts the pseudo attributes in the given table.

Copyright © 2004 Apache Software Foundation. All Rights Reserved.