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.


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 Document deepCloneDocument(Document doc, 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(Document doc, java.io.Writer w)
          Writes the given document using the given writer.
static void writeNode(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(Document doc,
                                 java.io.Writer w)
                          throws java.io.IOException
Writes the given document using the given writer.

writeNode

public static void writeNode(Node n,
                             java.io.Writer w)
                      throws java.io.IOException
Writes a node using the given writer.

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 Document deepCloneDocument(Document doc,
                                         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 © 2002 Apache Software Foundation. All Rights Reserved.