|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.six.ModelConverter
public class ModelConverter
Supports conversion of a XML representation in org.pf.six.Element to a DOM tree and vice versa as well as pretty printing of both kinds of XML representations to Strings.
| Constructor Summary | |
|---|---|
ModelConverter()
Initialize the new instance with default values. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Document |
toDOM(Element rootElement)
Converts the given SIX element and its children to a DOM Document tree. |
java.lang.String |
toFormattedString(Element element)
Returns the element and its attributes and children as string with new lines and indentation (2 chars). |
java.lang.String |
toFormattedString(org.w3c.dom.Element element)
Returns the element and its attributes and children as string with new lines and indentation (2 chars). |
java.lang.String |
toFormattedString(Element element,
int indent)
Returns the element and its attributes and children as string with new lines and indentation. |
java.lang.String |
toFormattedString(org.w3c.dom.Element element,
int indent)
Returns the element and its attributes and children as string with new lines and indentation. |
java.lang.String |
toFormattedString(Element element,
int indent,
boolean useSingleQuotes)
Returns the element and its attributes and children as string with new lines and indentation. |
java.lang.String |
toFormattedString(org.w3c.dom.Element element,
int indent,
boolean useSingleQuotes)
Returns the element and its attributes and children as string with new lines and indentation. |
Element |
toSIXElement(org.w3c.dom.Document doc)
Converts the given DOM Document tree to a SIX element tree. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelConverter()
| Method Detail |
|---|
public org.w3c.dom.Document toDOM(Element rootElement)
rootElement - The root element for the document to create
public Element toSIXElement(org.w3c.dom.Document doc)
doc - The document to be converted to the SIX structure
public java.lang.String toFormattedString(Element element)
element - An XML element, which is not necessarily the root of an XML document
public java.lang.String toFormattedString(Element element,
int indent)
element - An XML element, which is not necessarily the root of an XML documentindent - Specifies how much characters to indent after a new line
public java.lang.String toFormattedString(Element element,
int indent,
boolean useSingleQuotes)
element - An XML element, which is not necessarily the root of an XML documentindent - Specifies how much characters to indent after a new lineuseSingleQuotes - If true attribute values will be enclosed in quotes ('), otherwise in apostrophes (")public java.lang.String toFormattedString(org.w3c.dom.Element element)
element - A DOM element, which is not necessarily the root of an XML document
public java.lang.String toFormattedString(org.w3c.dom.Element element,
int indent)
element - A DOM element, which is not necessarily the root of an XML documentindent - Specifies how much characters to indent after a new line
public java.lang.String toFormattedString(org.w3c.dom.Element element,
int indent,
boolean useSingleQuotes)
element - A DOM element, which is not necessarily the root of an XML documentindent - Specifies how much characters to indent after a new lineuseSingleQuotes - If true attribute values will be enclosed in quotes ('), otherwise in apostrophes (")
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||