Examples of nextTag()


Examples of javax.xml.stream.XMLStreamReader.nextTag()

    private void testStreamReader(Object result) throws XMLStreamException {
        assertTrue("resolver does not return XMLStreamReader", result instanceof XMLStreamReader);
        XMLStreamReader streamReader = (XMLStreamReader) result;
        assertTrue("streamReader has no next element", streamReader.hasNext());
        assertEquals(XMLStreamConstants.START_ELEMENT, streamReader.nextTag());
        assertEquals("Invalid namespace", NAMESPACE_URI, streamReader.getNamespaceURI());
        assertEquals("Invalid local name", LOCAL_NAME, streamReader.getLocalName());
    }

    private void testEventReader(Object result) throws XMLStreamException {
View Full Code Here

Examples of org.apache.cxf.staxutils.DepthXMLStreamReader.nextTag()

            }
            if (this.mode == Service.Mode.MESSAGE) {
                StaxUtils.skipToStartOfElement(reader);
                StaxUtils.toNextTag(reader,
                                    new QName(ele.getNamespaceURI(), "Body"));
                reader.nextTag();
                return reader.getName();
            }
        } catch (XMLStreamException e) {
            // ignore
        }
View Full Code Here

Examples of org.apache.cxf.staxutils.W3CDOMStreamReader.nextTag()

            e = reader.read(part, exDetail);
        } else {
            DataReader<XMLStreamReader> reader = this.getDataReader(msg);
            XMLStreamReader xsr = new W3CDOMStreamReader(exDetail);
            try {
                xsr.nextTag();
            } catch (XMLStreamException e1) {
                throw new Fault(e1);
            }
            reader.setProperty(DataReader.FAULT, fault);
            e = reader.read(part, xsr);
View Full Code Here

Examples of org.apache.cxf.staxutils.W3CDOMStreamReader.nextTag()

                        if (supportsNode) {
                            object = getNodeDataReader(message).read(mpi, source);
                        } else {
                            W3CDOMStreamReader reader = new W3CDOMStreamReader((Element)source);
                            try {
                                reader.nextTag(); //advance into the first tag
                            } catch (XMLStreamException e) {
                                //ignore
                            }
                            object = getDataReader(message, XMLStreamReader.class).read(mpi, reader);
                        }
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlPullParser.nextTag()

    ResourceStreamNotFoundException, ParseException
  {
    XmlPullParser parser = new XmlPullParser();
    parser.parse(getLastResponseAsString());
    XmlTag tag;
    while ((tag = parser.nextTag()) != null)
    {
      if (tag.isOpen() && tag.getName().equals("script") &&
        "wicket-ajax-base-url".equals(tag.getAttribute("id")))
      {
        parser.next();
View Full Code Here

Examples of org.bladerunnerjs.utility.stax.XmlStreamCursor.nextTag()

                processGroup(streamReader, data, assetLocation);
                break;
            }
          }
         
          cursor.nextTag();
        }
      }
      catch (XMLStreamException e) {
        Location location = e.getLocation();
       
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.nextTag()

    }
    XMLInputFactory2 factory = getInputFactory();
    XMLStreamReader2 reader = (XMLStreamReader2) factory.createXMLStreamReader(getClass().getResourceAsStream("test-message.xml"), "utf-8");
    QName msgQName = new QName("http://server.hw.demo/", "sayHi");
    while (true) {
      int what = reader.nextTag();
      if (what == XMLStreamConstants.START_ELEMENT) {
        if (reader.getName().equals(msgQName)) {
          reader.validateAgainst(schema);
        }
      } else if (what == XMLStreamConstants.END_ELEMENT) {
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.nextTag()

        // note, should check 'if (conn.getResponseCode() != 200) ...'
       
        // Ok, let's read it then... (note: StaxMate could simplify a lot!)
        InputStream in = conn.getInputStream();
        XMLStreamReader2 sr = (XMLStreamReader2) _xmlInputFactory.createXMLStreamReader(in);
        sr.nextTag(); // to "files"
        byte[] buffer = new byte[4000];
       
        while (sr.nextTag() != XMLStreamConstants.END_ELEMENT) { // one more 'file'
            String filename = sr.getAttributeValue("", "name");
            String csumType = sr.getAttributeValue("", "checksumType");
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.nextTag()

        InputStream in = conn.getInputStream();
        XMLStreamReader2 sr = (XMLStreamReader2) _xmlInputFactory.createXMLStreamReader(in);
        sr.nextTag(); // to "files"
        byte[] buffer = new byte[4000];
       
        while (sr.nextTag() != XMLStreamConstants.END_ELEMENT) { // one more 'file'
            String filename = sr.getAttributeValue("", "name");
            String csumType = sr.getAttributeValue("", "checksumType");
            File outputFile = new File(toDir, filename);
            FileOutputStream out = new FileOutputStream(outputFile);
            files.add(outputFile);
View Full Code Here

Examples of org.codehaus.stax2.XMLStreamReader2.nextTag()

                md.update(buffer, 0, count);
                out.write(buffer, 0, count);
            }
            out.close();
            // Then verify checksum
            sr.nextTag()
            byte[] expectedCsum = sr.getAttributeAsBinary(sr.getAttributeIndex("", "value"));
            byte[] actualCsum = md.digest();
            if (!Arrays.equals(expectedCsum, actualCsum)) {
                throw new IllegalArgumentException("File '"+filename+"' corrupt: content checksum does not match expected");
            }
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.