Class XMLToXTalk


  • public class XMLToXTalk
    extends java.lang.Object
    Class for parsing an XML document and converting directly to XTalk.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  XMLToXTalk.StackEntry  
      private static class  XMLToXTalk.XTalkHandler
      This is a SAX document handler to parse XML into VinciFrames.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private XMLToXTalk()
      Utility class not intended to be instantiated.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String convert​(java.lang.String s)  
      static void main​(java.lang.String[] args)  
      private static void skipString​(java.io.RandomAccessFile raf)  
      private static int updateElement​(java.io.RandomAccessFile raf, java.util.ArrayList counts, int index)  
      static void xmlToXTalk​(java.io.Reader r, java.lang.String filename, boolean purgeWhitespace, java.lang.String xml_filename)
      Right now we assume there are NO processing instructions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLToXTalk

        private XMLToXTalk()
        Utility class not intended to be instantiated.
    • Method Detail

      • convert

        static java.lang.String convert​(java.lang.String s)
      • xmlToXTalk

        public static void xmlToXTalk​(java.io.Reader r,
                                      java.lang.String filename,
                                      boolean purgeWhitespace,
                                      java.lang.String xml_filename)
                               throws ServiceException,
                                      java.io.IOException
        Right now we assume there are NO processing instructions. Given an XML file, create an XTalk representation of that data. If xml_filename is non-null, then this method will also create a UTF-8 representation of the xml file, exactly mimicing the XTalk encoding (e.g. removing irrelevant whitespace, expanding entity refs, etc).
        Parameters:
        r - -
        filename - -
        purgeWhitespace - -
        xml_filename - -
        Throws:
        ServiceException - -
        java.io.IOException - -
      • updateElement

        private static int updateElement​(java.io.RandomAccessFile raf,
                                         java.util.ArrayList counts,
                                         int index)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • skipString

        private static void skipString​(java.io.RandomAccessFile raf)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception