Class XmlNewRawElement

All Implemented Interfaces:
IXmlElement, Serializable

public class XmlNewRawElement extends XmlNewElement implements IXmlElement
DANGEROUS class that does no output escaping!!!!
Since:
5.0
Author:
I. de Jong
See Also:
  • Constructor Details

    • XmlNewRawElement

      public XmlNewRawElement(IXmlElement existingElt)
      Constructs the raw element from an existing XML element.
      Parameters:
      existingElt - The XML element this element should take it's definition from.
    • XmlNewRawElement

      public XmlNewRawElement(String name)
      Constructs an empty raw element with just the name of the tag.
      Parameters:
      name - The name of the element.
    • XmlNewRawElement

      public XmlNewRawElement(String name, String stringValue)
      Constructs the element with a name and value.
      Parameters:
      name - The name of the element.
      stringValue - The value of the element.
    • XmlNewRawElement

      public XmlNewRawElement(String name, byte[] rawValue, String encoding)
      Constructs the element with a name and raw value.
      Parameters:
      name - The name of the element.
      rawValue - Byte array containing the value of the element.
      encoding - The encoding of the byte array.
    • XmlNewRawElement

      public XmlNewRawElement(String name, String stringValue, boolean stripXmlHeader)
      Convenience constructor to allow optional stripping of xml header of the passed value document. This is usually needed because otherwise you'll end up with an invalid XML document because there is an XML header somewhere in the middle of your document.
      Parameters:
      name - The name of the element.
      stringValue - The value of the element.
      stripXmlHeader - Boolean indicating if the xml header (when present) should be stripped from the value.
    • XmlNewRawElement

      public XmlNewRawElement(String name, byte[] rawValue, String encoding, boolean stripXmlHeader)
      Convenience constructor to allow optional stripping of xml header of the passed value document. This is usually needed because otherwise you'll end up with an invalid XML document because there is an XML header somewhere in the middle of your document.
      Parameters:
      name - The name of the element.
      rawValue - Byte array containing the value of the element.
      encoding - The encoding of the byte array.
      stripXmlHeader - Boolean indicating if the xml header (when present) should be stripped from the value.
  • Method Details

    • getValueXMLRepr

      protected void getValueXMLRepr(StringBuffer outputBuffer)
      Description copied from class: XmlNewElement
      This method appends the value of the tag to the string buffer.
      Overrides:
      getValueXMLRepr in class XmlNewElement
      Parameters:
      outputBuffer - The string buffer the value should be appended to.