Package javax.xml.stream.events

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


      else if (event.isEndElement()) {

        // the method  processEndElement will return null until we arrive at the end of the 'sbml' element.
        lastElement = sbmlElements.peek();

        currentNode = event.asEndElement().getName();
       
        if (currentNode != null) {
         
          boolean isSBMLelement = true;
         
View Full Code Here


      else if (event.isEndElement()) {

        // the method  processEndElement will return null until we arrive at the end of the 'sbml' element.
        lastElement = sbmlElements.peek();

        currentNode = event.asEndElement().getName();
       
        if (currentNode != null) {
         
          boolean isSBMLelement = true;
         
View Full Code Here

                    addNamespaceDeclarations();
                    fNamespaceContext.pushContext();
                    fSchemaDOMParser.startElement(fElementQName, fAttributes, null);
                    break;
                case XMLStreamConstants.END_ELEMENT:
                    EndElement end = currentEvent.asEndElement();
                    fillQName(fElementQName, end.getName());
                    fillDeclaredPrefixes(end);
                    fLocationWrapper.setLocation(end.getLocation());
                    fSchemaDOMParser.endElement(fElementQName, null);
                    fNamespaceContext.popContext();
View Full Code Here

                        message.append("Different elements ").append(startA.getName()).append(", ").append(startB.getName()).append(" at location ").append(eventA.getLocation());
                        return false;
                    }
                } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                    final EndElement endA = eventA.asEndElement();
                    final EndElement endB = eventB.asEndElement();
                    if (!endA.getName().getLocalPart().equals(endB.getName().getLocalPart())) {
                        message.append("Different elements ").append(endA.getName()).append(", ").append(endB.getName()).append(" at location ").append(eventA.getLocation());
                        return false;
                    }
                } else if (eventType == XMLStreamConstants.CHARACTERS) {
View Full Code Here

         else if (event.isEndElement()) {
           /*
            * This event happens when the parser hits the closing tag of an RSS-feed element.
            * We are interested at item-tags. When they close we want to save the information of the child elements to a new item-object and to the feed itself
            */
           if (event.asEndElement().getName().getLocalPart() == (_item)) {

             Item item = new Item();
            
            
             item.setTitle(title);
View Full Code Here

              }
            }else if(log.isWarnEnabled())
              log.warn("subscribe element must be inside <event> element");
          }
        }else if(event.isEndElement()){
          String name = event.asEndElement().getName().getLocalPart();
          if(name.equals("rpc"))
            actionMapping = new MapActionMapping<CallAction>(actions);
          else if(name.equals("event"))
            eventMapping = new MapActionMapping<EventAction>(events);
        }
View Full Code Here

                        processCharacters(event.asCharacters(), parentElement, map);
                        reader.nextEvent();
                        break;

                    case XMLStreamConstants.END_ELEMENT:
                        processEndTag(event.asEndElement(), parentElement);
                        reader.nextEvent();
                        return map;

                    case XMLStreamConstants.START_ELEMENT:
                        final StartElement element = event.asStartElement();
View Full Code Here

                        message.append("Different elements ").append(startA.getName()).append(", ").append(startB.getName()).append(" at location ").append(eventA.getLocation());
                        return false;
                    }
                } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                    EndElement endA = eventA.asEndElement();
                    EndElement endB = eventB.asEndElement();
                    if (!endA.getName().getLocalPart().equals(endB.getName().getLocalPart())) {
                        message.append("Different elements ").append(endA.getName()).append(", ").append(endB.getName()).append(" at location ").append(eventA.getLocation());
                        return false;
                    }
                } else if (eventType == XMLStreamConstants.CHARACTERS) {
View Full Code Here

                        continue;
                    }
                }
                else if (event.isEndElement())
                {
                    if (event.asEndElement().getName().getLocalPart().equals(ITEM))
                    {
                        // Store the title and link of the first entry we get - the first file on the list is all we need
                        versionTitle = title;
                        versionLink = link;
                        // All done, we don't need to know about older files.
View Full Code Here

          handleStartElement(event.asStartElement());
          break;
        case XMLStreamConstants.END_ELEMENT:
          elementDepth--;
          if (elementDepth >= 0) {
            handleEndElement(event.asEndElement());
          }
          break;
        case XMLStreamConstants.PROCESSING_INSTRUCTION:
          handleProcessingInstruction((ProcessingInstruction) event);
          break;
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.