|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.ecs.xml.XMLDocument
XMLDocument This is the container for XML elements that can be used similar to org.apache.ecs.Document. However, it correctly handles XML elements and doesn't have any notion of a head, body, etc., that is associated with HTML documents.
Field Summary | |
private java.lang.String |
codeset
|
private XML |
content
"Body" of document |
private static float |
DEFAULT_XML_VERSION
Default Version |
private java.util.Vector |
prolog
Prolog |
private java.lang.String |
versionDecl
Version Declaration - FIXME!! |
Constructor Summary | |
XMLDocument()
This sets the document up. |
|
XMLDocument(double version)
This sets the document up. |
|
XMLDocument(double version,
boolean standalone)
This sets the document up. |
|
XMLDocument(double version,
boolean standalone,
java.lang.String codeset)
This sets the document up. |
Method Summary | |
XMLDocument |
addElement(XML element)
This adds an element to the XML document. |
XMLDocument |
addStylesheet(java.lang.String href)
This adds a stylesheet to the XML document, and assumes the default text/xsl type. |
XMLDocument |
addStylesheet(java.lang.String href,
java.lang.String type)
This adds a stylesheet to the XML document. |
XMLDocument |
addToProlog(ConcreteElement element)
This adds the specified element to the prolog of the document |
java.lang.Object |
clone()
Clone this document |
java.lang.String |
getCodeset()
This gets the codeset for this document |
void |
output(java.io.OutputStream out)
Write the document to the OutputStream |
void |
output(java.io.PrintWriter out)
Write the document to the PrintWriter |
void |
setCodeset(java.lang.String codeset)
This sets the codeset for this document |
java.lang.String |
toString()
Override toString so it does something useful |
java.lang.String |
toString(java.lang.String codeset)
Override toString so it prints something useful |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final float DEFAULT_XML_VERSION
private java.lang.String versionDecl
private java.util.Vector prolog
private XML content
private java.lang.String codeset
Constructor Detail |
public XMLDocument()
public XMLDocument(double version)
version
- - version of XML this document ispublic XMLDocument(double version, boolean standalone)
version
- - version of XML document isstandalone
- - boolean: true
if standalone, else falsepublic XMLDocument(double version, boolean standalone, java.lang.String codeset)
version
- - version of XML document isstandalone
- - boolean: true
codeset
- - String codeset to useMethod Detail |
public void setCodeset(java.lang.String codeset)
codeset
- - String representation of codeset for this
documentpublic java.lang.String getCodeset()
public XMLDocument addStylesheet(java.lang.String href, java.lang.String type)
href
- - String reference to stylesheettype
- - String type of stylesheetpublic XMLDocument addStylesheet(java.lang.String href)
text/xsl
type.href
- = String reference to stylesheetpublic XMLDocument addToProlog(ConcreteElement element)
element
- - Element to addpublic XMLDocument addElement(XML element)
element
- - XML Element to addpublic void output(java.io.OutputStream out)
out
- - OutputStream to write topublic void output(java.io.PrintWriter out)
out
- - PrintWriter to write topublic final java.lang.String toString()
toString
in class java.lang.Object
public final java.lang.String toString(java.lang.String codeset)
codeset
- - String codeset to usepublic java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |