Class SourceToXml
java.lang.Object
org.apache.torque.generator.source.stream.SourceToXml
Creates an xml String out of a source tree.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the String by which a child element is indented relative to its parent.voidSets the String by which a child element is indented relative to its parent.toXml(SourceElement rootElement, boolean createIdAttributes) Renders a source element and its children as XML.
-
Constructor Details
-
SourceToXml
public SourceToXml()
-
-
Method Details
-
toXml
Renders a source element and its children as XML.- Parameters:
rootElement- the element to render.createIdAttributes- whether id attributes should be created and filled automatically.- Returns:
- the created XML.
- Throws:
SourceException- if automaticIds is false and an element is encountered twice in the source tree.
-
getIndent
Returns the String by which a child element is indented relative to its parent.- Returns:
- the indent String.
-
setIndent
Sets the String by which a child element is indented relative to its parent.- Parameters:
indent- the indent String to set.
-