org.apache.batik.dom.util
Class DOMUtilities
public
class
DOMUtilities
extends XMLUtilities
A collection of utility functions for the DOM.
Field Summary |
protected static String[] | LOCK_STRINGS
String constants representing DOM modifier strings for various all
key lock combinations. |
protected static String[] | MODIFIER_STRINGS
String constants representing DOM modifier strings for various all
shift modifier combinations. |
Method Summary |
static String | contentToString(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 String | getLocalName(String s)
Gets the local name from the given qualified name.
|
static String | getModifiersList(int lockState, int modifiers)
Gets a DOM 3 modifiers string from the given lock and
shift bitmasks. |
static String | getPrefix(String s)
Gets the prefix from the given qualified name.
|
static boolean | isValidName(String s)
Tests whether the given string is a valid name. |
static boolean | isValidName11(String s)
Tests whether the given string is a valid XML 1.1 name. |
static boolean | isValidPrefix(String s)
Tests whether the given string is a valid prefix.
|
static void | parseStyleSheetPIData(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, Writer w)
Writes the given document using the given writer. |
static void | writeNode(Node n, Writer w)
Writes a node using the given writer. |
protected static final String[] LOCK_STRINGS
String constants representing DOM modifier strings for various all
key lock combinations.
protected static final String[] MODIFIER_STRINGS
String constants representing DOM modifier strings for various all
shift modifier combinations.
protected DOMUtilities()
Do not need to be instantiated.
public static String contentToString(String s)
Returns the given content value transformed to replace invalid
characters with entities.
public static Document deepCloneDocument(Document doc, DOMImplementation impl)
Deep clones a document using the given DOM implementation.
public static String getLocalName(String s)
Gets the local name from the given qualified name.
This method assume that isValidName(s) is true.
public static String getModifiersList(int lockState, int modifiers)
Gets a DOM 3 modifiers string from the given lock and
shift bitmasks.
public static String getPrefix(String s)
Gets the prefix from the given qualified name.
This method assume that isValidName(s) is true.
public static boolean isValidName(String s)
Tests whether the given string is a valid name.
public static boolean isValidName11(String s)
Tests whether the given string is a valid XML 1.1 name.
public static boolean isValidPrefix(String s)
Tests whether the given string is a valid prefix.
This method assume that isValidName(s) is true.
public static void parseStyleSheetPIData(String data,
HashTable table)
Parses a 'xml-stylesheet' processing instruction data section and
puts the pseudo attributes in the given table.
public static void writeDocument(Document doc, Writer w)
Writes the given document using the given writer.
public static void writeNode(Node n, Writer w)
Writes a node using the given writer.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.