Interface XmlParser

All Known Implementing Classes:
XStreamParser

public interface XmlParser
An XML parser that is capable of conversion between XML character data, Dto type Objects and vice versa.
Author:
Mike Whittaker
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts if possible, a String, that must be in XML format, to a Dto.
    toXml(Dto obj)
    Converts a Dto Object to XML character data.
  • Method Details

    • fromXml

      Object fromXml(String xml) throws EsendexException
      Converts if possible, a String, that must be in XML format, to a Dto.
      Parameters:
      xml - the character data to be converted
      Returns:
      a Dto object representing the argument
      Throws:
      EsendexException - if there is any problem reading or parseing the XML.
    • toXml

      String toXml(Dto obj)
      Converts a Dto Object to XML character data.
      Parameters:
      obj - the Dto Object to be converted.
      Returns:
      A String representation of the Dto argument.