Package com.ociweb.xml

Examples of com.ociweb.xml.WAX.start()


        // </car>

        out("Associate a non-default namespace with the XML:");
        wax = new WAX();
        String prefix = "c";
        wax.start(prefix, "car").attr("year", 2008)
           .namespace(prefix, "http://www.ociweb.com/cars")
           .child(prefix, "model", "Prius").close();
        // <c:car year="2008"
        //   xmlns:c="http://www.ociweb.com/cars">
        //   <c:model>Prius</c:model>
View Full Code Here


        //   <c:model>Prius</c:model>
        // </c:car>

        out("Associate an XML Schema:");
        wax = new WAX();
        wax.start("car").attr("year", 2008)
           .defaultNamespace("http://www.ociweb.com/cars", "car.xsd")
           .child("model", "Prius").close();
        // <car year="2008"
        //   xmlns="http://www.ociweb.com/cars"
        //   xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
View Full Code Here

        //   <model>Prius</model>
        // </car>

        out("Associate multiple XML Schemas:");
        wax = new WAX();
        wax.start("car").attr("year", 2008)
           .defaultNamespace("http://www.ociweb.com/cars", "car.xsd")
           .namespace("m", "http://www.ociweb.com/model", "model.xsd")
           .child("m", "model", "Prius").close();
        // <car year="2008"
        //   xmlns="http://www.ociweb.com/cars"
View Full Code Here

        //  &moreData;
        //</root>

        out("Default indentation - text and comment:");
        wax = new WAX();
        wax.start("foo").text("bar").comment("baz").close();

        out("Default indentation - text and cdata:");
        wax = new WAX();
        wax.start("foo").text("bar").cdata("baz").close();
    }
View Full Code Here

        wax = new WAX();
        wax.start("foo").text("bar").comment("baz").close();

        out("Default indentation - text and cdata:");
        wax = new WAX();
        wax.start("foo").text("bar").cdata("baz").close();
    }

    private static void out(String text) {
        System.out.println("\n\n" + text);
    }
View Full Code Here

        WAX wax = new WAX(Version.V1_0);

        wax.xslt("artist.xslt");
        wax.dtd("http://www.ociweb.com/xml/music.dtd");

        wax.start("artist");
        wax.attr("name", "Gardot, Melody");
        wax.defaultNamespace("http://www.ociweb.com/music",
            "http://www.ociweb.com/xml/music.xsd");
        wax.namespace("date", "http://www.ociweb.com/date",
            "http://www.ociweb.com/xml/date.xsd");
View Full Code Here

            "http://www.ociweb.com/xml/music.xsd");
        wax.namespace("date", "http://www.ociweb.com/date",
            "http://www.ociweb.com/xml/date.xsd");

        wax.comment("This is one of my favorite CDs!");
        wax.start("cd");
        wax.attr("year", 2007);

        wax.child("title", "Worrisome Heart");
        wax.child("date", "purchaseDate", "4/3/2008");
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.