Class XMLString

  • All Implemented Interfaces:
    XmlProducer

    public class XMLString
    extends Object
    implements XmlProducer
    A representation of an XML chunk.
    Author:
    Steinar Knutsen
    • Constructor Detail

      • XMLString

        public XMLString​(String content)
    • Method Detail

      • writeXML

        public StringBuilder writeXML​(StringBuilder target)
        Description copied from interface: XmlProducer
        Append the XML representation of this object's data to a StringBuilder.
        Specified by:
        writeXML in interface XmlProducer
        Parameters:
        target - the StringBuilder to append to.
        Returns:
        the target passed in is also returned (to allow chaining).
      • toXML

        public String toXML()
        Description copied from interface: XmlProducer
        Convenience method equivalent to: writeXML(new StringBuilder()).toString()
        Specified by:
        toXML in interface XmlProducer
        Returns:
        String containing XML representation of this object's data.