FilemakerUtils { public static FilemakerDocument createDocument(InputStream input) throws SAXException, IOException, ParserConfigurationException { return createDocument(XmlUtils.newDocument(input, true)); } private  FilemakerUtils(); static FilemakerDocument createDocument(InputStream input); static FilemakerDocument createDocument(File xmlFile); static FilemakerDocument createDocument(String xmlString); static FilemakerDocument createDocument(Document doc); @SuppressWarnings("unused") static Marshaller createMarshaller(); @SuppressWarnings("Duplicates") static Marshaller createMarshaller(String encoding, boolean formatted); static Unmarshaller createUnmarshaller(); synchronized static JAXBContext getContext(); synchronized static org.openestate.io.filemaker.xml.layout.ObjectFactory getFactoryForLayout(); synchronized static org.openestate.io.filemaker.xml.result.ObjectFactory getFactoryForResult(); synchronized static void initContext(ClassLoader classloader); static Boolean parseBoolean(String value); static String printBoolean(Boolean value); @SuppressWarnings("unused")
    final static String NAMESPACE; @SuppressWarnings("unused")
    final static String PACKAGE; @SuppressWarnings("unused")
    final static org.openestate.io.filemaker.xml.layout.ObjectFactory FACTORY_LAYOUT; @SuppressWarnings("unused")
    final static org.openestate.io.filemaker.xml.result.ObjectFactory FACTORY_RESULT; }
@Test public void testCreateDocument() { String transferXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<FMPXMLRESULT xmlns=\"http: + " <ERRORCODE>0</ERRORCODE>\n" + " <PRODUCT BUILD=\"03-20-2006\" NAME=\"FileMaker Pro\" VERSION=\"8.0v3\"/>\n" + " <DATABASE DATEFORMAT=\"D.m.yyyy\" LAYOUT=\"fmmedia2universal\" NAME=\"AngGes\" RECORDS=\"13723\" TIMEFORMAT=\"k:mm:ss \"/>\n" + " <METADATA>\n" + " <FIELD EMPTYOK=\"YES\" MAXREPEAT=\"1\" NAME=\"aNumericField\" TYPE=\"NUMBER\"/>\n" + " <FIELD EMPTYOK=\"YES\" MAXREPEAT=\"1\" NAME=\"aTextField\" TYPE=\"TEXT\"/>\n" + " </METADATA>\n" + " <RESULTSET FOUND=\"2\">\n" + " <ROW MODID=\"1\" RECORDID=\"1\">\n" + " <COL>\n" + " <DATA>123</DATA>\n" + " </COL>\n" + " <COL>\n" + " <DATA>this is a text</DATA>\n" + " </COL>\n" + " </ROW>\n" + " <ROW MODID=\"2\" RECORDID=\"2\">\n" + " <COL>\n" + " <DATA>456</DATA>\n" + " </COL>\n" + " <COL>\n" + " <DATA>this is another text</DATA>\n" + " </COL>\n" + " </ROW>\n" + " </RESULTSET>\n" + "</FMPXMLRESULT>"; FilemakerDocument doc; try { doc = FilemakerUtils.createDocument(transferXml); Assert.assertNotNull( "Transfer was processed.", doc); Assert.assertTrue( "Transfer was processed as FilemakerDocument.", doc instanceof FilemakerResultDocument); } catch (Exception ex) { LOGGER.error("Test of FilemakerUtils.createDocument failed!"); LOGGER.error("> " + ex.getLocalizedMessage(), ex); Assert.fail("Test of FilemakerUtils.createDocument failed!"); } }