Class XMLString

  • All Implemented Interfaces:
    XmlProducer

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

      Constructors 
      Constructor Description
      XMLString​(java.lang.String content)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      java.lang.String toXML()
      Convenience method equivalent to: writeXML(new StringBuilder()).toString()
      java.lang.StringBuilder writeXML​(java.lang.StringBuilder target)
      Append the XML representation of this object's data to a StringBuilder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XMLString

        public XMLString​(java.lang.String content)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeXML

        public java.lang.StringBuilder writeXML​(java.lang.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 java.lang.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.