public class SourceToXml extends Object
Constructor and Description |
---|
SourceToXml() |
Modifier and Type | Method and Description |
---|---|
String |
getIndent()
Returns the String by which a child element is indented relative to
its parent.
|
void |
setIndent(String indent)
Sets the String by which a child element is indented relative to
its parent.
|
String |
toXml(SourceElement rootElement,
boolean createIdAttributes)
Renders a source element and its children as XML.
|
public String toXml(SourceElement rootElement, boolean createIdAttributes) throws SourceException
rootElement
- the element to render.createIdAttributes
- whether id attributes should be created
and filled automatically.SourceException
- if automaticIds is false and an element
is encountered twice in the source tree.public String getIndent()
public void setIndent(String indent)
indent
- the indent String to set.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.