Package xal.model.xml

Class LatticeXmlWriter

java.lang.Object
xal.model.xml.LatticeXmlWriter

public class LatticeXmlWriter extends Object
Writes a Lattice object to an XML document, using the same format supported by LatticeXmlParser. Calling either the static method writeXml, or the instance method writeLatticeToFile with a Lattice object and a URI string identifying the fully-qualified output file, causes the elements comprising the Lattice to be written to the specified file.
Version:
$id:
Author:
Craig McChesney
  • Constructor Details

    • LatticeXmlWriter

      public LatticeXmlWriter()
  • Method Details

    • writeXml

      public static void writeXml(Lattice lattice, String fileURI) throws IOException
      Writes supplied Lattice to the specified XML file.
      Parameters:
      lattice - The Lattice to output
      fileURI - String URI of output file
      Throws:
      IOException - error writing to fileURI
    • documentForLattice

      public static Document documentForLattice(Lattice lattice) throws IOException
      Returns a DOM for the supplied lattice.
      Parameters:
      lattice - the Lattice whose DOM to return
      Returns:
      a DOM for the supplied lattice
      Throws:
      IOException