Package gw.xml.simple

Class SimpleXmlNodeWriter


  • public class SimpleXmlNodeWriter
    extends java.lang.Object
    • Field Detail

      • _sb

        private java.lang.StringBuilder _sb
      • _indent

        private int _indent
    • Constructor Detail

      • SimpleXmlNodeWriter

        private SimpleXmlNodeWriter()
    • Method Detail

      • writeToString

        public static java.lang.String writeToString​(SimpleXmlNode node)
      • createXml

        private java.lang.String createXml​(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 encode
        attribute - is this for an attribute? (returned value will be pre-quoted)
        Returns:
        the XML-encoded input