Search in sources :

Example 26 with VTDException

use of com.ximpleware.VTDException in project translationstudio8 by heartsome.

the class AbstractDrawing method save.

protected void save() {
    try {
        XMLByteOutputStream xbos = new XMLByteOutputStream(xm.getUpdatedDocumentSize());
        xm.output(xbos);
        this.xmlContent = new String(xbos.getXML());
        xbos.close();
    // System.out.println(this.xmlContent);
    } catch (VTDException e) {
        logger.error("", e);
    } catch (IOException e) {
        logger.error("", e);
    }
}
Also used : VTDException(com.ximpleware.VTDException) XMLByteOutputStream(com.ximpleware.XMLByteOutputStream) IOException(java.io.IOException)

Example 27 with VTDException

use of com.ximpleware.VTDException in project translationstudio8 by heartsome.

the class AbstractDrawing method loadXML.

private void loadXML() {
    VTDGen vg = new VTDGen();
    vg.setDoc(this.xmlContent.getBytes());
    try {
        vg.parse(true);
        vu = new VTDUtils(vg.getNav());
        xm = new XMLModifier(vu.getVTDNav());
    } catch (VTDException e) {
        logger.error("", e);
    }
}
Also used : XMLModifier(com.ximpleware.XMLModifier) VTDUtils(net.heartsome.xml.vtdimpl.VTDUtils) VTDException(com.ximpleware.VTDException) VTDGen(com.ximpleware.VTDGen)

Aggregations

VTDException (com.ximpleware.VTDException)27 AutoPilot (com.ximpleware.AutoPilot)20 VTDUtils (net.heartsome.xml.vtdimpl.VTDUtils)9 VTDGen (com.ximpleware.VTDGen)8 IOException (java.io.IOException)6 InternalFileException (net.heartsome.cat.converter.msexcel2007.common.InternalFileException)5 XMLModifier (com.ximpleware.XMLModifier)3 File (java.io.File)3 FileInputStream (java.io.FileInputStream)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)3 Relationship (net.heartsome.cat.converter.msexcel2007.document.rels.Relationship)3 NavException (com.ximpleware.NavException)2 VTDNav (com.ximpleware.VTDNav)2 FileNotFoundException (java.io.FileNotFoundException)2 ArrayList (java.util.ArrayList)2 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)2 EOFException (com.ximpleware.EOFException)1 EncodingException (com.ximpleware.EncodingException)1 EntityException (com.ximpleware.EntityException)1 ModifyException (com.ximpleware.ModifyException)1