|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.xml.jaxp.DOMInternalRepresentation
public class DOMInternalRepresentation
The class used to represent an XML document and to implement the W3C DOM.
| Constructor Summary | ||
|---|---|---|
DOMInternalRepresentation()
|
||
| Method Summary | ||
|---|---|---|
static void |
compress(Node n)
Causes the DOM to compact the representation of the document containing the Node. |
|
static void |
dump(Node n)
Dump routine (for debugging only). |
|
boolean |
getCoalescing()
Determines if this DOM merges whitespace. |
|
boolean |
getExpandingEntities()
Determines if this DOM expands entities. |
|
static DOMInternalRepresentation |
getIR(Node node)
Given any DOM node, returns its associated DOMInternalRepresentation. |
|
static void |
parse(Document document,
DefaultHandler handler)
Parses an internal representation and generates callbacks to a SAX handler. |
|
Document |
parse(InputSource is,
SAXParser parser)
Parses an XML document and returns a Document node. |
|
void |
parse(DefaultHandler handler)
Parses an internal representation and generates callbacks to a SAX parser handler. |
|
DocumentFragment |
parseFragment(String str)
Parses a string to produce a DocumentFragment node. |
|
void |
setCoalescing(boolean coalescing)
Configures this DOM to turn CDATA sections into text nodes and merge adjacent text nodes. |
|
void |
setEntityResolver(EntityResolver er)
Registers an entity resolver to use when parsing an XML document. |
|
void |
setErrorHandler(ErrorHandler eh)
Registers an error handler to use when parsing an XML document. |
|
void |
setExpandingEntities(boolean expandingEntities)
Configures this DOM to expand entities. |
|
void |
setIgnoringComments(boolean ignoreComments)
Configure this DOM to discard comments. |
|
void |
setIgnoringWhitespace(boolean ignoreWhitespace)
Configures this DOM to discard igorable whitespace, rather than saving it as text nodes. |
|
void |
setNamespaceAware(boolean aware)
Configure this DOM to be namespace aware. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DOMInternalRepresentation()
| Method Detail |
|---|
public DocumentFragment parseFragment(String str)
throws SAXException,
IOException
Parses a string to produce a DocumentFragment node.
str - The string to parse.
IOException
SAXException
public Document parse(InputSource is,
SAXParser parser)
throws SAXException,
IOException
Document node.
is - The XML document.parser - A SAX parser capable of parsing the InputSource.
Document node that represents the XML document.
SAXException
IOExceptionpublic void setErrorHandler(ErrorHandler eh)
eh - An error handler.public void setEntityResolver(EntityResolver er)
er - An EntityResolver.public void setCoalescing(boolean coalescing)
coalescing - True to configure this DOM to turn CDATA sections into
text nodes and merge adjacent text nodes; false otherwise.public void setIgnoringWhitespace(boolean ignoreWhitespace)
ignoreWhitespace - True to configure this DOM to discard ignorable whitespace;
false otherwise.public void setIgnoringComments(boolean ignoreComments)
ignoreComments - True to configure this DOM to discard
comments; false otherwise.public void setNamespaceAware(boolean aware)
aware - True to configure this DOM to be namespace aware; false otherwise.public void setExpandingEntities(boolean expandingEntities)
expandingEntities - True to expand entities; false otherwise.public boolean getCoalescing()
public boolean getExpandingEntities()
public static DOMInternalRepresentation getIR(Node node)
DOMInternalRepresentation.
node - A DOM node.
DOMInternalRepresentation.
public static void parse(Document document,
DefaultHandler handler)
throws SAXException
document - The document to parse.handler - The SAX DefaultHandler that receives the callbacks.
SAXException
public void parse(DefaultHandler handler)
throws SAXException
handler - The SAX DefaultHandler that receives the callbacks.
SAXExceptionpublic static void compress(Node n)
node - A DOM node.public static void dump(Node n)
n - A node.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.