Package com.volantis.mcs.wbdom

Examples of com.volantis.mcs.wbdom.WBDOMElement


   
    // Inherit Javadoc.
    public void emptyElement(DissectableElement element)
            throws DissectionException {
        WBDOMElement delement = (WBDOMElement) element;
        boolean hasAttributes = delement.hasAttributes();
        // can't do this check because sometimes we force stuff to be
        // empty that isn't really.
//        if (delement.hasChildren()) {
//            throw new IllegalStateException(
//                    "Attempt to write an invalid (non-empty) element");
//        }
        try {
            // Serialise the start of the element.
            elementNameSerialiser.use(hasAttributes, false);
            delement.accept(elementNameSerialiser);
            // Serialise the attributes.
            if (hasAttributes) {
                attributesSerialiser.use(delement);
                delement.forEachAttribute(attributesSerialiser);
                handler.endElement();
            }
        } catch (WBDOMException e) {
            throw new DissectionException(e);
        } catch (WBSAXException e) {
View Full Code Here


    }

    // Inherit Javadoc.
    public void startElement(DissectableElement element)
            throws DissectionException {
        final WBDOMElement delement = (WBDOMElement) element;
        boolean hasAttributes = delement.hasAttributes();
        // can't do this check as sometimes we force stuff to be non-empty
        // which is empty!
//        if (!delement.hasChildren()) {
//            throw new IllegalStateException(
//                    "Attempt to write start of an invalid (empty) element " +
//                    delement);
//        }
        try {
            // Serialise the start of the element.
            elementNameSerialiser.use(hasAttributes, true);
            delement.accept(elementNameSerialiser);
            // Serialise the attributes.
            if (hasAttributes) {
                attributesSerialiser.use(delement);
                delement.forEachAttribute(attributesSerialiser);
            }
            handler.startContent();
        } catch (WBDOMException e) {
            throw new DissectionException(e);
        } catch (WBSAXException e) {
View Full Code Here

    }

    // Inherit Javadoc.
    public void endElement(DissectableElement element)
            throws DissectionException {
        WBDOMElement delement = (WBDOMElement) element;
        // can't do this check as sometimes we force stuff to be non-empty
        // which is empty!
//        if (!delement.hasChildren()) {
//            throw new IllegalStateException(
//                    "Attempt to write end of an invalid (empty) element " +
View Full Code Here

    public void startElement(OpaqueElementStart element, boolean content)
        throws WBSAXException {
        SpecialOpaqueElementStart specialStart =
                (SpecialOpaqueElementStart) element;
        // Create a new element
        WBDOMElement specialElement = ((DissectableWBDOMFactory) factory).
                createDissectionElement(specialStart.getType(),
                        specialStart.getAnnotation());
        pushElement(specialElement);
        // If there is no content - fake an end element.
        if (!content) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.wbdom.WBDOMElement

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.