Package javax.xml.stream.events

Examples of javax.xml.stream.events.EndElement


    this.xmlEventWriter.add( startElement );
  }

  public void endElement() throws XMLStreamException
  {
    final EndElement endElement = this.xmlEventFactory.createEndElement( this.name, null );
    this.xmlEventWriter.add( endElement );
  }
View Full Code Here


      final StartElement startElement = getRootElement( xmlEventFactory );
      xmlEventWriter.add( startElement );

      writeBody( xmlEventFactory, xmlEventWriter );

      final EndElement endElement = xmlEventFactory.createEndElement( startElement.getName(), null );
      xmlEventWriter.add( endElement );

      xmlEventWriter.add( xmlEventFactory.createEndDocument() );

      xmlEventWriter.close();
View Full Code Here

          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 );
            fireXMLEvent( _elementHandler, event );
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;
               case XMLStreamConstants.CHARACTERS :
                  String chars = event.asCharacters().getData();
View Full Code Here

                        getUnknownParser().parse(xmlEventReader, element);
                    }

                }
                if (event.isEndElement()) {
                    EndElement end = (EndElement) event;
                    verifyMatch(start, end);
                    break;
                }
            }
           
View Full Code Here

                    // Parse the unknown element.
                    getUnknownParser().parse(xmlEventReader, event
                            .asStartElement());
                } else if (event.isEndElement()) {
                    EndElement end = (EndElement) event;
                    verifyMatch(start, end);
                    break;
                } else if (event.isCharacters()) {
                    Characters characters = (Characters) event;
                    str = characters.getData();
View Full Code Here

                        getUnknownParser().parse(xmlEventReader, element);
                    }

                }
                if (event.isEndElement()) {
                    EndElement end = (EndElement) event;
                    verifyMatch(start, end);
                    break;
                }
            }
View Full Code Here

                        // Treat anything else as unknown
                        getUnknownParser().parse(xmlEventReader, element);
                    }

                } else if (event.isEndElement()) {
                    EndElement end = (EndElement) event;
                    verifyMatch(start, end);
                    break;
                }
            }
           
View Full Code Here

                        getUnknownParser().parse(xmlEventReader, element);
                    }

                }
                if (event.isEndElement()) {
                    EndElement end = (EndElement) event;
                    verifyMatch(start, end);
                    break;
                }
            }
           
View Full Code Here

                if (event.isCharacters()) {
                    Characters characters = (Characters) event;
                    data.setValue(characters.getData());
                }
                if (event.isEndElement()) {
                    EndElement end = (EndElement) event;
                    verifyMatch(start, end);
                    break;
                }
            }
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.