Examples of asStartElement()


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

      //If there are pruned elements in the queue filtering events is still needed
      if (!prunedElements.isEmpty()) {
        //If another start element add it to the queue
        if (event.isStartElement()) {
          final StartElement startElement = event.asStartElement();
          prunedElements.push(startElement.getName());
        }
        //If end element pop the newest name of the queue and double check that the start/end elements match up
        else if (event.isEndElement()) {
          final QName startElementName = prunedElements.pop();
View Full Code Here

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

    }

    final Schema validationSchema;
    final Class jaxbTarget;

    final String elementName = event.asStartElement().getName().getLocalPart();

    if ( "entity-mappings".equals( elementName ) ) {
      final Attribute attribute = event.asStartElement().getAttributeByName( ORM_VERSION_ATTRIBUTE_QNAME );
      final String explicitVersion = attribute == null ? null : attribute.getValue();
      validationSchema = resolveSupportedOrmXsd( explicitVersion );
View Full Code Here

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

    final Class jaxbTarget;

    final String elementName = event.asStartElement().getName().getLocalPart();

    if ( "entity-mappings".equals( elementName ) ) {
      final Attribute attribute = event.asStartElement().getAttributeByName( ORM_VERSION_ATTRIBUTE_QNAME );
      final String explicitVersion = attribute == null ? null : attribute.getValue();
      validationSchema = resolveSupportedOrmXsd( explicitVersion );
      jaxbTarget = JaxbEntityMappings.class;
    }
    else {
View Full Code Here

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

      {
         XMLEvent event = reader.nextEvent();
         switch (event.getEventType())
         {
            case XMLStreamConstants.START_ELEMENT :
               StartElement startElement = event.asStartElement();

               Map<String, String> attr = new HashMap<String, String>();

               Iterator attributes = startElement.getAttributes();
               while (attributes.hasNext())
View Full Code Here

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

                writer.writeNamespace(ns.getPrefix(), ns.getNamespaceURI());
                break;
            }
           
            case XMLEvent.START_ELEMENT: {
                StartElement se = event.asStartElement();
                QName n = se.getName();
                writer.writeStartElement(n.getPrefix(), n.getLocalPart(),
                                          n.getNamespaceURI());
                Iterator<?> it = se.getNamespaces();
                while (it.hasNext()) {
View Full Code Here

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

        if (xmlEvent == null) {
            return false;
        }

        if (xmlEvent != null &&
            xmlEvent.asStartElement()
                .getAttributeByName(QName.valueOf("preview"))
                .getValue()
                .equals("0") ){
            isPreview = false;
        } else {
View Full Code Here

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

            int eType = xmlEvent.getEventType();
            if (eType != XMLStreamConstants.START_ELEMENT){
                continue;
            }

            StartElement startElement = xmlEvent.asStartElement();
            if(startElement
                    .getName()
                    .getLocalPart()
                    .equals(elementName)){
                return xmlEvent;
View Full Code Here

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

            switch (eType) {
                case XMLStreamConstants.START_ELEMENT:
                    if (level++ > 0){
                        break;
                    }
                    StartElement startElement = xmlEvent.asStartElement();
                    if (startElement
                            .getName()
                            .getLocalPart()
                            .equals(elementName)) {
                        xmlReader.nextEvent();
View Full Code Here

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

        while (xmlReader.hasNext()) {
            xmlEvent = xmlReader.nextEvent();
            eType = xmlEvent.getEventType();
            switch (eType) {
                case XMLStreamConstants.START_ELEMENT:
                    final StartElement startElement = xmlEvent.asStartElement();
                    @SuppressWarnings("unchecked")
                    Iterator<Attribute> attrIttr =
                        startElement.getAttributes();
                    if (level == 0) {
                        if (attrIttr.hasNext())
View Full Code Here

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

            while ( eventReader.hasNext() ) {
                XMLEvent event = eventReader.nextEvent();

                if ( event.isStartElement() ) {
                    final AssetEditorConfigElement element = AssetEditorConfigElement.forName( event.asStartElement().getName().getLocalPart() );
                    switch ( element ) {
                        case ASSET_EDITOR : {
                            configuration = new AssetEditorConfiguration();
                            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.