Class XsdWriter

java.lang.Object
org.apache.rat.tools.xsd.XsdWriter

public class XsdWriter extends Object
A writer that writes XSD nodes.
  • Constructor Details

    • XsdWriter

      public XsdWriter(Writer writer)
      Creates an XSD writer that wraps a standard Writer.
      Parameters:
      writer - the writer to wrap.
  • Method Details

    • init

      public XsdWriter init() throws IOException
      Initializes the writer. Writes the initial "xs:schema tag" .
      Returns:
      the Writer.
      Throws:
      IOException - on error.
    • finish

      public void finish() throws IOException
      Finishes the process. Closes the document.
      Throws:
      IOException - on error.
    • open

      public XsdWriter open(XsdWriter.Type type, String... attributeMap) throws IOException
      Opens (Starts) an element of the specified type along with its attributes.
      Parameters:
      type - the Type to start.
      attributeMap - the attributes for the element.
      Returns:
      this.
      Throws:
      IOException - on error.
    • attribute

      public XsdWriter attribute(String name, String... attributeMap) throws IOException
      Writes the attributes
      Parameters:
      name - The name of the attribute.
      attributeMap - the attributes of the attribute.
      Returns:
      this.
      Throws:
      IOException - on error.
    • close

      public XsdWriter close(XsdWriter.Type type) throws IOException
      Closes (Ends) the element for the type.
      Parameters:
      type - The type to close.
      Returns:
      this.
      Throws:
      IOException - on error