Class XMLToVinci


  • public class XMLToVinci
    extends Object
    Class for parsing an XML document and representing it using any of the various jVinci-compatible document models.
    • Method Detail

      • xmlToTransportable

        public static Transportable xmlToTransportable​(Reader r,
                                                       Transportable empty)
                                                throws ServiceException
        Populate the empty document with the XML yielded by the provided reader.
        Parameters:
        empty - An empty document to be populated.
        r - A reader providing the XML to populate the empty document.
        Returns:
        -
        Throws:
        ServiceException - if there is a parse error.
      • xmlToVinciFrame

        public static VinciFrame xmlToVinciFrame​(Reader r)
                                          throws ServiceException
        Convert the XML document (provided as a Reader) to a VinciFrame document model. Throws ServiceException if the XML parser reports any error. WARNING: This method will silently ignore any attributes or processing instructions within the document since VinciFrame cannot represent them. Consider using AFrame if attribute support is required. This implementation of xmlToVinciFrame uses apache SAX parser directly. It should be faster, and it should be tolerant of undeclared namespaces, unlike the previous impl.
        Parameters:
        r - A reader providing the XML to convert.
        Returns:
        -
        Throws:
        ServiceException - if there is a parse error.
      • xmlToAFrame

        public static AFrame xmlToAFrame​(Reader r)
                                  throws ServiceException
        Convert the XML document (provided as a Reader) to the AFrame document model. Throws ServiceException if the XML parser reports any error. WARNING: This method will silently ignore any processing instructions within the document since AFrame cannot represent them.
        Parameters:
        r - A reader providing the XML to convert.
        Returns:
        -
        Throws:
        ServiceException - if there is a parse error.