Examples of HelloDocument


Examples of org.apache.xmlbeans.samples.template.sampletemplate.HelloDocument

    public void validate(String filename)
        throws org.apache.xmlbeans.XmlException, java.io.IOException
    {
        System.out.println("parsing document: " + filename);
        HelloDocument doc = HelloDocument.Factory.parse(new File(filename));

        ArrayList errors = new ArrayList();
        XmlOptions opts = new XmlOptions();
        opts.setErrorListener(errors);

        if (doc.validate(opts))
        {
            System.out.println("document is valid.");

            String[] names = doc.getHello().getNameArray();
            for (int i = 0; i < names.length; i++)
            {
                System.out.println(" hi there, " + names[i] + "!");
            }
        }
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.