Examples of newXMLInputStream()


Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

        XmlObject x = XmlObject.Factory.parse(xml);

        // get an XMLInputStream and move to XMLEvent.START_ELEMENT for 'b'
        XmlCursor c = x.newCursor();
        XMLInputStream xis = c.newXMLInputStream();
        c.dispose();
        while (xis.hasNext() && xis.next().getType() != XMLEvent.START_ELEMENT) {
        }

        // reparse from 'b' element using an sub-XMLInputStream
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

    private void doXmlStreamTest ( String xml )
        throws Exception
    {
        XmlCursor c = XmlObject.Factory.parse( xml ).newCursor();
        XMLInputStream xmlStream = c.newXMLInputStream();
        XmlObject o = XmlObject.Factory.parse( xmlStream );
        Assert.assertTrue( o.xmlText().equals( xml ) );
    }

    private void doSaverTest ( String xml )
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

       
        c.insertElement( "bar", "bar.com" );
       
        c.toStartDoc();

        XMLInputStream xis = c.newXMLInputStream();

        XMLEvent xev;
        StartDocument startDocument;
        EndDocument endDocument;
        StartElement startElement;
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

        // Test ChangePrefixMapping event
        //

        o = XmlObject.Factory.parse( "<foo xmlns:x=\"y\"><bar xmlns:x=\"z\"/></foo>" );
        c = o.newCursor();
        xis = c.newXMLInputStream();
       
        startDocument = (StartDocument) xis.next();
       
        startPrefixMapping = (StartPrefixMapping) xis.next();
        str = startPrefixMapping.getNamespaceUri();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

        // Test CharacterData events
        //

        o = XmlObject.Factory.parse( "<foo>a<bar>b<baz>c</baz>d</bar>e</foo>" );
        c = o.newCursor();
        xis = c.newXMLInputStream();
       
        startDocument = (StartDocument) xis.next();

        startElement = (StartElement) xis.next();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

        // Test SubStreams
        //

        o = XmlObject.Factory.parse( "<foo>a<bar>b<baz>c</baz>d</bar>e</foo>" );
        c = o.newCursor();
        xis = c.newXMLInputStream();
       
        startDocument = (StartDocument) xis.next();

        startElement = (StartElement) xis.next();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.newXMLInputStream()

    public XMLInputStream newXMLInputStream()
        { return newXMLInputStream(null); }

    public XMLInputStream newXMLInputStream(XmlOptions options)
        { XmlCursor cur = newCursorForce(); try { return cur.newXMLInputStream(makeInnerOptions(options)); } finally { cur.dispose(); } }

    public XMLStreamReader newXMLStreamReader()
        { return newXMLStreamReader(null); }

    public XMLStreamReader newXMLStreamReader(XmlOptions options)
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.newXMLInputStream()

                "<any " + ns + " xsi:type='kindaPrime'>100</any>",
                null, null );

        // Make sure the unvalidated stream is OK

        XMLInputStream xis = x.newXMLInputStream();

        while ( xis.hasNext() )
            xis.next();

        // Make sure the validated stream fails
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.newXMLInputStream()

        boolean blewChunks = false;

        xis =
            stl.newValidatingXMLInputStream(
                x.newXMLInputStream(), null, null );

        try
        {
            while ( xis.hasNext() )
                xis.next();
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.newXMLInputStream()

        messagePlan.setInfoForElement(new QName("LastTradePrice"), new MessagePlan.ParamInfo(0, MessagePlan.ParamInfo.SINGLETON, param1Plan));
        messagePlan.setInfoForElement(new QName("inputStruct"), new MessagePlan.ParamInfo(1, MessagePlan.ParamInfo.SINGLETON, param2Plan));

        XmlObject xobj = XmlObject.Factory.parse(new File(args[0]));
        XMLInputStream xinput = xobj.newXMLInputStream();
        while (xinput.hasNext())
        {
            if (xinput.peek().isStartElement())
                break;
            xinput.skip();
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.