Examples of XMLParser


Examples of de.pdark.decentxml.XMLParser

    public static Document parse(final String xml, final String originDetails) throws IOException {
        return parse (new XMLStringSource (xml), originDetails);  
    }
   
    public static Document parse(final XMLSource xmlSource, final String originDetails) throws IOException {
        XMLParser parser = new XMLParser () {
            @Override
            protected XMLTokenizer createTokenizer(XMLSource source) {
                XMLTokenizer tolerantTokenizerIgnoringEntities = new TolerantXMLTokenizer(source, originDetails);
                tolerantTokenizerIgnoringEntities.setTreatEntitiesAsText (this.isTreatEntitiesAsText());
                return tolerantTokenizerIgnoringEntities;
            }
        };
        return parser.parse (xmlSource);  
    }
View Full Code Here

Examples of etch.util.core.xml.XmlParser

  public Message startMessage() throws IOException
  {
    stack.clear();
   
    TagElement te = new XmlParser().parseOne( rdr, null, MESSAGE_TAG );
    stack.push( te );
    elementList.push( te.getChildren() );
   
    Integer id = te.getIntAttr( null, STRUCT_TYPE_ATTR );
    Type type = vf.getType( id );
View Full Code Here

Examples of gd.xml.XMLParser

    public TinyXMLTest(String type, String fname) {
        filename = fname;
        prefix = "  ";
        try {
            XMLParser xp = new XMLParser();
            if (type.equals("xml"))
                xp.parseXML(this);
            if (type.equals("dtd"))
                xp.parseDTD(this);
        } catch (ParseException e) {
            System.out.println(e.toString());
        }
    }
View Full Code Here

Examples of groovy.util.XmlParser

        return xml;
    }

    @Override
    public void load(InputStream inputStream) throws Exception {
        xml = new XmlParser().parse(inputStream);
        load(xml);
    }
View Full Code Here

Examples of groovy.util.XmlParser

        }

        public Node asNode() {
            if (node == null) {
                try {
                    node = new XmlParser().parseText(toString());
                } catch (Exception e) {
                    throw UncheckedException.asUncheckedException(e);
                }
                builder = null;
                element = null;
View Full Code Here

Examples of layoutHandling.XMLParser

                "<language presence=\"show\" culture=\"show\"/>"+
                "<lesson hierarchy=\"deep\" help=\"more\" access=\"limited\" choice=\"limited\" ambiguity=\"less\"/>"+
                "<data security=\"absent\"/>"+
                "<comment>Comment text for Romania's CAE-L description</comment>"+
                "</cael>";
       XMLParser parser = new XMLParser(xml);
       parser.parseXML();
       LayoutHandler lh = parser.getLh();
       lh.toString();
    }
View Full Code Here

Examples of name.pehl.totoe.xml.client.XmlParser

        {
            namespacesValue = null;
        }
        try
        {
            Document document = new XmlParser().parse(xmlValue, namespacesValue);
            if (contextValue != null && contextValue.trim().length() != 0)
            {
                contextNode = document.selectNode(contextValue);
            }
            else
View Full Code Here

Examples of net.rim.tumbler.xml.XMLParser

            WidgetArchive wa = new WidgetArchive( sessionManager.getWidgetArchive() );
            wa.validate();

            // parse/validate config.xml
            Logger.logMessage( LogType.INFO, "PROGRESS_SESSION_CONFIGXML" );
            XMLParser xmlparser = new ConfigXMLParser();
            WidgetConfig config = xmlparser.parseXML( wa ); // raw data, without \

            // create/clean outputs/source
            // Logger.printInfoMessage("BlackBerry WebWorks application packaging starts...");
            FileManager fileManager = new FileManager( bbwpProperties, config.getAccessTable() );
            Logger.logMessage( LogType.INFO, "PROGRESS_FILE_POPULATING_SOURCE" );
View Full Code Here

Examples of org.apache.commons.jelly.parser.XMLParser

    {
        // FIXME: This should all be done by Jelly.
        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware( true );
        XMLReader reader = factory.newSAXParser().getXMLReader();
        XMLParser parser = new XMLParser( reader );
        parser.setContext( context );
        parser.setClassLoader( context.getClassLoader() );

        Script script = null;

        InputSource source = null;
        if ( encoding != null )
        {
            InputStreamReader isr = null;
            try
            {
                isr = new InputStreamReader( scriptInputStream, encoding );
                source = new InputSource( isr );

            }
            finally
            {
                if ( isr != null )
                {
                    try
                    {
                        isr.close();
                    }
                    catch ( IOException e )
                    {
                        log.debug( "WARNING: Cannot close stream!", e );
                    }
                    isr = null;
                }
            }

        }
        else
        {
            source = new InputSource( scriptInputStream );
        }

        if ( systemId != null )
        {
            source.setSystemId( systemId );
        }
        if ( log.isDebugEnabled() )
            log.debug( "the system identifier to help resolve relative URLs : " + systemId );
        script = parser.parse( source );

        script = script.compile();

        return script;
    }
View Full Code Here

Examples of org.apache.devicemap.loader.parser.XMLParser

    /*
     * loads device data from an InputStreamReader
     */
    private void loadDeviceData(Reader in) throws IOException {
        XMLParser parser = new XMLParser(in);
        String tag;
        Device device = new Device();
        Map<String, String> attributes = new HashMap<String, String>();

        while (!(tag = parser.getNextTag()).isEmpty()) {
            //new device found
            if (tag.startsWith("<device ")) {
                device.setId(XMLParser.getAttribute(tag, "id"));
                device.setParentId(XMLParser.getAttribute(tag, "parentId"));
            } else if (tag.equals("</device>")) {
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.