Package javax.xml.stream.events

Examples of javax.xml.stream.events.EndElement


        if (o == this) return true;
        if (o == null) return false;

        if (!(o instanceof EndElement)) return false;

        EndElement other = (EndElement) o;
        // First of all, names must match obviously
        if (getName().equals(other.getName())) {
            /* But then, what about namespaces etc? For now,
             * let's actually not consider namespaces: chances
             * are corresponding START_ELEMENT must have matched
             * well enough.
             */
 
View Full Code Here


        try {
            XMLEventFactory factory = XMLEventFactory.newInstance();
            StartElement startEl = factory.createStartElement(obj.getName(), null, null);
            evtWriter.add(startEl);
            staxObject.writeObjectToStax(obj, evtWriter, factory);
            EndElement endEl = factory.createEndElement(obj.getName(), null);
            evtWriter.add(endEl);
            evtWriter.flush();
        } catch (XMLStreamException ex) {
           
        }
View Full Code Here

        try {
            XMLEventFactory factory = XMLEventFactory.newInstance();
            StartElement startEl = factory.createStartElement(obj.getName(), null, null);
            evtWriter.add(startEl);
            staxObject.writeObjectToStax(obj, evtWriter, factory);
            EndElement endEl = factory.createEndElement(obj.getName(), null);
            evtWriter.add(endEl);
            evtWriter.flush();
        } catch (XMLStreamException ex) {
           
        }
View Full Code Here

        writer.add(startEl);

        Characters charEvt = factory.createCharacters(value);
        writer.add(charEvt);

        EndElement endEl = factory.createEndElement(objName, null);
        writer.add(endEl);
    }
View Full Code Here

        writer.add(startEl);

        Characters charEvt = factory.createCharacters(((CorbaAnyHandler)obj).getValueData());
        writer.add(charEvt);

        EndElement endEl = factory.createEndElement(objName, null);
        writer.add(endEl);   
    }
View Full Code Here

                StartElement startEl = factory.createStartElement(handlerName, null, null);
                writer.add(startEl);
            }
            writeObjectToStax(handler, el, writer, factory, true);
            if (nestedArray) {
                EndElement endEl = factory.createEndElement(handlerName, null);
                writer.add(endEl);
            }
        }
        if (isTopLevel) {
            EndElement endEl = factory.createEndElement(objName, null);
            writer.add(endEl);
        }
    }
View Full Code Here

        StartElement startEl = factory.createStartElement(objName, null, null);
        writer.add(startEl);   
        CorbaEnumHandler enumHandler = (CorbaEnumHandler)obj;
        Characters charEvt = factory.createCharacters(enumHandler.getValue());
        writer.add(charEvt);
        EndElement endEl = factory.createEndElement(objName, null);
        writer.add(endEl);
    }
View Full Code Here

        XmlSchemaGroupBase group = (XmlSchemaGroupBase) ctype.getParticle();
        List<CorbaObjectHandler> elements = exObj.getMembers();
        for (int i = 0; i < elements.size(); i++) {
            writeObjectToStax(elements.get(i), group.getItems().getItem(i), writer, factory, true);
        }
        EndElement endEl = factory.createEndElement(objName, null);
        writer.add(endEl);
    }
View Full Code Here

                    StartElement startEl = factory.createStartElement(objName, null, null);
                    writer.add(startEl);
                }
                writeObjectToStax(handler, el, writer, factory, true);
                if (nestedSequence) {
                    EndElement endEl = factory.createEndElement(objName, null);
                    writer.add(endEl);
                }
            }
        } else {
            CorbaSequenceHandler seqHandler = (CorbaSequenceHandler) obj;
            List<CorbaObjectHandler> elements = seqHandler.getElements();
            byte[] value = new byte[elements.size()];
            for (int i = 0; i < elements.size(); i++) {
                CorbaPrimitiveHandler handler = (CorbaPrimitiveHandler) elements.get(i);
                value[i] = ((Byte) handler.getValue()).byteValue();
            }
            Characters charEvt = factory.createCharacters(new String(value));
            writer.add(charEvt);
        }
        if (isTopLevel) {
            EndElement endEl = factory.createEndElement(name, null);
            writer.add(endEl);
        }
    }
View Full Code Here

                schemaObj = members.getItem(memberCount++);
            }
            writeObjectToStax(elementsIter.next(), schemaObj, writer, factory, true);
        }
        if (writeElement) {
            EndElement endEl = factory.createEndElement(objName, null);
            writer.add(endEl);
        }
    }
View Full Code Here

TOP

Related Classes of javax.xml.stream.events.EndElement

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.