Examples of XmlPullParserFactory


Examples of org.xmlpull.v1.XmlPullParserFactory

    {
        this.container = new Dsmlv2Container( grammar.getLdapCodecService() );
        this.container.setGrammar( grammar );
        this.grammar = grammar;
       
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        factory.setNamespaceAware( true );
        XmlPullParser xpp = factory.newPullParser();

        container.setParser( xpp );
    }
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

     * @return a new parser instance
     * @throws XmlPullParserException if the factory fails
     * @since 1.4.1
     */
    public static XmlPullParser createDefaultParser() throws XmlPullParserException {
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        return factory.newPullParser();
    }
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

        if (!input.ready()) {
            return null;
        }

        //create stream parser
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(false);

        //parse root element
        XmlPullParser parser = factory.newPullParser();
        //parser.setInput(input, "UTF-8");
        parser.setInput(input);
        parser.nextTag();

        String namespace = (parser.getNamespace() != null) ? parser.getNamespace() : "";
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

        return map;
    }

    Map readOpPost(BufferedReader input) throws Exception {
        //create stream parser
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(false);

        //parse root element
        XmlPullParser parser = factory.newPullParser();
        parser.setInput(input);
        parser.nextTag();

        Map map = new HashMap();
        map.put("request", parser.getName());
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

            String type, String version) throws Exception {
        Map defns = caller.getDefns();
        if (shouldImportRootValuesOnly(caller))
            defns.put(ROOT_VALUES_ONLY_TAG, "true");

        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        XmlPullParser parser = factory.newPullParser();

        parser.setInput(in, ENCODING);
        parser.nextTag();
        parser.require(XmlPullParser.START_TAG, null, DATA_ELEM);
        importData(parser, defns, null);
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

            throws IOException {
        zipOut.putNextEntry(new ZipEntry(MANIFEST_FILE_NAME));

        XmlSerializer xml = null;
        try {
            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
            xml = factory.newSerializer();
        } catch (XmlPullParserException xppe) {
            throw new RuntimeException("Couldn't obtain xml serializer", xppe);
        }

        xml.setOutput(zipOut, ENCODING);
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

    public static void write(Writer out, Iterator timeLogEntries, boolean close)
            throws IOException {
        XmlSerializer ser = null;
        try {
            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
            ser = factory.newSerializer();
        } catch (XmlPullParserException xppe) {
            throw new RuntimeException("Couldn't obtain xml serializer", xppe);
        }

        ser.setOutput(out);
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

    private void writeDataElements(Writer out, HashTree sorted)
            throws IOException {
        XmlSerializer xml = null;
        try {
            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
            xml = factory.newSerializer();
        } catch (XmlPullParserException xppe) {
            throw new RuntimeException("Couldn't obtain xml serializer", xppe);
        }

        // we need to write our header manually, because we need to specify
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

    public TimeLogReader(InputStream in, boolean close) throws IOException {
        if (in != null)
            try {
                this.in = in;
                this.close = close;
                XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
                parser = factory.newPullParser();
                try {
                    parser.setFeature(FEATURE_RELAXED, true);
                } catch (Exception e) {}
                parser.setInput(in, ENCODING);
                fill();
View Full Code Here

Examples of org.xmlpull.v1.XmlPullParserFactory

    private void readAndProcessArchive() throws IOException,
            XmlPullParserException {
        shouldDeleteArchiveFileOnCompletion = false;
        zipFile = new ZipFile(file);
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        XmlPullParser parser = factory.newPullParser();

        InputStream manifestIn = openEntry(zipFile, MANIFEST_FILE_NAME);
        parser.setInput(manifestIn, ENCODING);

        parser.nextTag();
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.