Package com.ociweb.xml

Examples of com.ociweb.xml.PrologWAX


public class CDDemo2 {

    public static void main(String[] args) {
        // Write to stdout with an XML declaration that specifies version 1.0.
        // If the version is omitted then no XML declaration will be written.
        PrologWAX pw = (PrologWAX) new WAX(Version.V1_0);

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

        StartTagWAX stw = pw.start("artist");
        stw.attr("name", "Gardot, Melody");
        stw.defaultNamespace("http://www.ociweb.com/music",
            "http://www.ociweb.com/xml/music.xsd");
        stw.namespace("date", "http://www.ociweb.com/date",
            "http://www.ociweb.com/xml/date.xsd");

        pw.comment("This is one of my favorite CDs!");
        stw = pw.start("cd");
        stw.attr("year", 2007);
        ElementWAX ew = stw.child("title", "Worrisome Heart");
        ew = stw.child("date", "purchaseDate", "4/3/2008");

        ew.close(); // terminates all unterminated elements
View Full Code Here

TOP

Related Classes of com.ociweb.xml.PrologWAX

Copyright © 2018 www.massapicom. 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.