|
XDC - v. 0.6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.xdc.util.XmlUtils
This is a utility class responsible for parsing and printing XML documents.
| Method Summary | |
static org.w3c.dom.Document |
createDocument()
This method creates a new DOM document. |
static java.lang.String |
getLink(org.w3c.dom.Element node)
This method is the Java equivalent to the template with mode="util.getLink" defined in the util.xsl
stylesheet. |
static java.lang.String |
getTextValue(org.w3c.dom.Node node)
This utility method retrieves the text value from a DOM Node. |
static org.w3c.dom.Document |
parse(java.io.InputStream in)
This method creates an XML document from the contents of an InputStream. |
static void |
printHtml(java.io.Writer out,
org.w3c.dom.Document doc)
This method streams an XML document with method="html" into a Writer object. |
static void |
printXml(java.io.Writer out,
org.w3c.dom.Document doc)
This method streams an XML document with method="xml" into a Writer object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static org.w3c.dom.Document createDocument()
throws XmlException
XmlException
public static void printHtml(java.io.Writer out,
org.w3c.dom.Document doc)
throws java.io.IOException
Writer object.
out - The Writer object to which the contents of the
document are written.doc - The XML document to be streamed to the Writer
java.io.IOException
public static void printXml(java.io.Writer out,
org.w3c.dom.Document doc)
throws java.io.IOException
Writer object.
out - The Writer object to which the contents of the
document are written.doc - The XML document to be streamed to the Writer
java.io.IOException
public static org.w3c.dom.Document parse(java.io.InputStream in)
throws XmlException
InputStream.
in - The InputStream parsed by this method
Document object with the contents of the
InputStream
XmlExceptionpublic static java.lang.String getLink(org.w3c.dom.Element node)
mode="util.getLink" defined in the util.xsl
stylesheet. It creates a name for an XML element which can be used for
interlinking parts of the documentation. Unlike the links between
element summary descriptions and their detailed descriptions (which are
created by simply numbering the nodes in the order of occurrence),
this template creates a name from all the element's attributes by
concatenating the element name with a sequence of all attribute names
and values, separated by a tilde (~), with the attribute names sorted
alphabetically and blanks in the attribute values omitted. <myNode yourAttr="attr one" ourAttr="attr two"/> myNode~outAttr~attrtwo~yourAttr~attrone
node - The DOM Node for which the link name is
to be constructed
Nodepublic static java.lang.String getTextValue(org.w3c.dom.Node node)
Node.
node - The node whose text value is to be retrieved
Node's text value
|
XDC - v. 0.6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||