Package org.dom4j.jaxb

Examples of org.dom4j.jaxb.JAXBModifier.modify()


            File inputFile = new File("xml/jaxb/primer.xml");

            JAXBModifier jaxbReader = new JAXBModifier("org.dom4j.test.primer");
            jaxbReader.addObjectModifier("/purchaseOrders/purchaseOrder",
                    new PurchaseOrderDateModifier());
            Document doc = jaxbReader.modify(inputFile);

            System.out.println("Modified document:");
            System.out.println(doc.asXML());
            System.out.println();
        } catch (Exception e) {
View Full Code Here


                    "org.dom4j.test.primer", OutputFormat.createPrettyPrint());
            jaxbModifier.setPruneElements(true);
            jaxbModifier.setOutput(outputFile);
            jaxbModifier.addObjectModifier("/purchaseOrders/purchaseOrder",
                    new PurchaseOrderDateModifier());
            Document doc = jaxbModifier.modify(inputFile);

            System.out.println("Pruned modified document:");
            System.out.println(doc.asXML());
            System.out.println();
        } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.