Package org.apache.excalibur.xml.dom

Examples of org.apache.excalibur.xml.dom.DOMHandler


        try
        {
            final SAXParser parser = (SAXParser)manager.lookup( SAXParser.ROLE );
            final DOMHandlerFactory handlerFactory = (DOMHandlerFactory)manager.lookup( DOMHandlerFactory.ROLE );

            final DOMHandler handler = handlerFactory.createDOMHandler();
            parser.parse( new InputSource( IN ), handler );
            final Document document = handler.getDocument();

            final Element root = document.getDocumentElement();
            assertEquals( "Wrong root element", "test:root", root.getNodeName() );
            assertEquals( "Wrong namespace uri", "http://localhost/test", root.getNamespaceURI() );
View Full Code Here


        try
        {
            final SAXParser parser = (SAXParser)manager.lookup( SAXParser.ROLE );
            final DOMHandlerFactory handlerFactory = (DOMHandlerFactory)manager.lookup( DOMHandlerFactory.ROLE );       

            final DOMHandler handler = handlerFactory.createDOMHandler();
            parser.parse( new InputSource( IN ), handler );           
            final Document document = handler.getDocument();
           
            final Element root = document.getDocumentElement();
            assertEquals( "Wrong root element", "test:root", root.getNodeName() );
            assertEquals( "Wrong namespace uri", "http://localhost/test", root.getNamespaceURI() );
           
View Full Code Here

TOP

Related Classes of org.apache.excalibur.xml.dom.DOMHandler

Copyright © 2018 www.massapicom. 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.