Package javax.xml.stream.events

Examples of javax.xml.stream.events.XMLEvent.asEndElement()


          startedElements.addLast( name );
        }
      }
      else {
        if (event.isEndElement()) {
          final EndElement endElement = event.asEndElement();
          final QName endedElementName = endElement.getName();
          final QName lastStarted = startedElements.removeLast();
          assert endedElementName.equals( lastStarted );
          if (startedElements.isEmpty()) {
            _elementHandler.elementEnded( endElement );
View Full Code Here


                  QName name = element.getName();
                  importer.startElement(name.getNamespaceURI(), name.getLocalPart(), name.getPrefix() + ":"
                     + name.getLocalPart(), attr);
                  break;
               case XMLStreamConstants.END_ELEMENT :
                  EndElement endElement = event.asEndElement();
                  importer.endElement(endElement.getName().getNamespaceURI(), endElement.getName().getLocalPart(),
                     endElement.getName().getPrefix() + ":" + endElement.getName().getLocalPart());
                  break;
               case XMLStreamConstants.PROCESSING_INSTRUCTION :
                  break;
View Full Code Here

                            break;
                        }
                    }
                }
                if (event.isEndElement()) {
                    final AssetEditorConfigElement element = AssetEditorConfigElement.forName(event
                            .asEndElement().getName().getLocalPart());
                    if (element == AssetEditorConfigElement.ASSET_EDITOR) {
                        assetEditors.add(configuration);
                    }
                }
View Full Code Here

                            break;
                        }
                    }
                }
                if (event.isEndElement()) {
                    final AssetEditorConfigElement element = AssetEditorConfigElement.forName(event
                            .asEndElement().getName().getLocalPart());
                    if (element == AssetEditorConfigElement.ASSET_EDITOR) {
                        assetEditors.add(configuration);
                    }
                }
View Full Code Here

        while( input.hasNext() )
        {
            XMLEvent currentTag = input.nextTag();
            if( currentTag.isEndElement() )
            {
                String endElementName = currentTag.asEndElement().getName().getLocalPart();
                switch( endElementName )
                {
                    case "array":
                        break WHILE;
                    case "value":
View Full Code Here

        if( !nextTag.isStartElement() || !"array".equals( nextTag.asStartElement().getName().getLocalPart() ) )
        {
            throw new ValueSerializationException( "Expected an <array/> but got: " + nextTag );
        }
        XMLEvent currentTag = input.nextTag(); // <object>
        while( !currentTag.isEndElement() || !"array".equals( currentTag.asEndElement().getName().getLocalPart() ) )
        {
            if( !currentTag.isStartElement() || !"object".equals( currentTag.asStartElement().getName().getLocalPart() ) )
            {
                throw new ValueSerializationException( "Expected an <object/> but got: " + nextTag );
            }
View Full Code Here

                throw new ValueSerializationException( "Expected an <object/> but got: " + nextTag );
            }
            currentTag = input.nextTag(); // <field>
            K key = null;
            V value = null;
            while( !currentTag.isEndElement() || !"object".equals( currentTag.asEndElement().getName().getLocalPart() ) )
            {
                input.nextTag(); // <name>
                String keyOrValue = input.nextEvent().asCharacters().getData();
                input.nextTag(); // </name>
                input.nextTag(); // <value>
View Full Code Here

                    // Push the name of the unknown element.
                    skippedElements.push(name);
                }
                if (event.isEndElement()) {

                    String name = event.asEndElement().getName()
                            .getLocalPart();

                    if (skippedElements.size() == 0
                            || !skippedElements.peek().equals(name)) {
                        throw new GraphIOException(
View Full Code Here

                            break;
                        }
                    }
                }
                if (event.isEndElement()) {
                    final PerspectiveConfigurationElement element = PerspectiveConfigurationElement.forName(event
                            .asEndElement().getName().getLocalPart());
                    if (element == PerspectiveConfigurationElement.MODULE_EDITOR) {
                        moduleEditors.add(configuration);
                    }
                }
View Full Code Here

        while (xmlReader.hasNext()) {
            XMLEvent e = xmlReader.nextEvent();
            if (e.isStartDocument()) handler.startDocument();
            else if (e.isEndDocument()) handler.endDocument();
            else if (e.isStartElement()) emitSE(e.asStartElement());
            else if (e.isEndElement()) emitEE(e.asEndElement());
            else if (e.isProcessingInstruction()) emitPi((ProcessingInstruction) e);
            else if (e.isCharacters()) emitChars(e.asCharacters());
            else if (e.isAttribute()) emitAttr((Attribute) e);
            else if (e.isEntityReference()) emitEnt((EntityDeclaration) e);
            else if (e.isNamespace()) emitNS((Namespace) e);
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.