Package gw.xml.simple
Class SimpleXmlNodeWriter
- java.lang.Object
-
- gw.xml.simple.SimpleXmlNodeWriter
-
public class SimpleXmlNodeWriter extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSimpleXmlNodeWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidappendAttributes(SimpleXmlNode node)private voidappendChildren(SimpleXmlNode node)private voidappendIndent()private voidappendNode(SimpleXmlNode node)private java.lang.StringcreateXml(SimpleXmlNode node)private voidpopIndent()private voidpushIndent()static java.lang.StringwriteToString(SimpleXmlNode node)private static java.lang.StringxmlEncode(java.lang.String input, boolean attribute)Properly encodes user input for inclusion in an XML document.
-
-
-
Method Detail
-
writeToString
public static java.lang.String writeToString(SimpleXmlNode node)
-
createXml
private java.lang.String createXml(SimpleXmlNode node)
-
appendNode
private void appendNode(SimpleXmlNode node)
-
appendAttributes
private void appendAttributes(SimpleXmlNode node)
-
appendChildren
private void appendChildren(SimpleXmlNode node)
-
pushIndent
private void pushIndent()
-
popIndent
private void popIndent()
-
appendIndent
private void appendIndent()
-
xmlEncode
private static java.lang.String xmlEncode(java.lang.String input, boolean attribute)Properly encodes user input for inclusion in an XML document.- Parameters:
input- the input to encodeattribute- is this for an attribute? (returned value will be pre-quoted)- Returns:
- the XML-encoded input
-
-