Class XmlVisitor

java.lang.Object
org.refcodes.schema.XmlVisitor
All Implemented Interfaces:
SchemaVisitor<String>

public class XmlVisitor extends Object implements SchemaVisitor<String>
The XmlVisitor is a SchemaVisitor producing an XML String when visiting a Schema structure.
  • Constructor Details

    • XmlVisitor

      public XmlVisitor()
  • Method Details

    • visit

      public String visit(Schema aSchema)

      Visits the given Schema instance and returns the produced result.

      Implementations typically traverse the schema recursively and aggregate results from child schemas.

      Specified by:
      visit in interface SchemaVisitor<String>
      Parameters:
      aSchema - the schema to visit
      Returns:
      the result produced by the visitor
    • toString

      protected String toString(Object aObj)
      Hook method for converting a type to an according String.
      Parameters:
      aObj - The value of a given type to be converted accordingly.
      Returns:
      The accordingly converted value.