Package com.sun.xml.bind.unmarshaller

Examples of com.sun.xml.bind.unmarshaller.DOMScanner.scan()


    protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
        if(fragment)
            contentHandler = new FragmentContentHandler(contentHandler);
        DOMScanner ds = new DOMScanner();
        ds.setContentHandler(contentHandler);
        ds.scan(payload);
    }

    public Message copy() {
        return new DOMMessage(this);
    }
View Full Code Here


        LocationResolver resolver = new LocationResolver(scanner);
        resolver.setContentHandler(contentHandler);   

        // parse this DOM.
        scanner.setContentHandler(resolver);
        scanner.scan(e);
    }
   
    /**
     * Generates the whole set of SAX events from the given Document
     * in the DOMForest.
View Full Code Here

            LocatorImpl loc = new LocatorImpl();
            loc.setSystemId(systemId);
            scanner.setLocator(loc);

            scanner.setContentHandler(getParserHandler(systemId));
            scanner.scan(element);
        } catch (SAXException e) {
            // since parsing DOM shouldn't cause a SAX exception
            // and our handler will never throw it, it's not clear
            // if this will ever happen.
            fatalError(new SAXParseException2(
View Full Code Here

            LocatorImpl loc = new LocatorImpl();
            loc.setSystemId(systemId);
            scanner.setLocator(loc);

            scanner.setContentHandler(getParserHandler(systemId));
            scanner.scan(element);
        } catch (SAXException e) {
            // since parsing DOM shouldn't cause a SAX exception
            // and our handler will never throw it, it's not clear
            // if this will ever happen.
            fatalError(new SAXParseException2(
View Full Code Here

/*     */
/* 310 */       InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null, false, expectedType));
/* 311 */       scanner.setContentHandler(new SAXConnector(handler, scanner));
/*     */
/* 313 */       if ((node instanceof Element)) {
/* 314 */         scanner.scan((Element)node);
/*     */       }
/* 316 */       else if ((node instanceof Document)) {
/* 317 */         scanner.scan((Document)node);
/*     */       }
/*     */       else {
View Full Code Here

/*     */
/* 313 */       if ((node instanceof Element)) {
/* 314 */         scanner.scan((Element)node);
/*     */       }
/* 316 */       else if ((node instanceof Document)) {
/* 317 */         scanner.scan((Document)node);
/*     */       }
/*     */       else {
/* 320 */         throw new IllegalArgumentException("Unexpected node type: " + node);
/*     */       }
/* 322 */       return handler.getContext().getResult(); } catch (SAXException e) {
View Full Code Here

        LocationResolver resolver = new LocationResolver(scanner);
        resolver.setContentHandler(contentHandler);

        // parse this DOM.
        scanner.setContentHandler(resolver);
        scanner.scan(e);
    }

    /**
     * Generates the whole set of SAX events from the given Document
     * in the DOMForest.
View Full Code Here

            InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null,false,expectedType));
            scanner.setContentHandler(new SAXConnector(handler,scanner));

            if(node.getNodeType() == Node.ELEMENT_NODE)
                scanner.scan((Element)node);
            else
            if(node.getNodeType() == Node.DOCUMENT_NODE)
                scanner.scan((Document)node);
            else
                // no other type of input is supported
View Full Code Here

            if(node.getNodeType() == Node.ELEMENT_NODE)
                scanner.scan((Element)node);
            else
            if(node.getNodeType() == Node.DOCUMENT_NODE)
                scanner.scan((Document)node);
            else
                // no other type of input is supported
                throw new IllegalArgumentException("Unexpected node type: "+node);

            Object retVal = handler.getContext().getResult();
View Full Code Here

            LocatorImpl loc = new LocatorImpl();
            loc.setSystemId(systemId);
            scanner.setLocator(loc);

            scanner.setContentHandler(getParserHandler(systemId));
            scanner.scan(element);
        } catch (SAXException e) {
            // since parsing DOM shouldn't cause a SAX exception
            // and our handler will never throw it, it's not clear
            // if this will ever happen.
            fatalError(new SAXParseException2(
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.