Examples of EndElement


Examples of javax.xml.stream.events.EndElement

            writer.add(startEl);
            CorbaObjectHandler unionValue = unionHandler.getValue();
            if (unionValue != null) {
                writeObjectToStax(unionValue, stype, writer, factory, true);
            }
            EndElement endEl = factory.createEndElement(objName, null);
            writer.add(endEl);
        }
    }
View Full Code Here

Examples of javax.xml.stream.events.EndElement

            StartElement startEl = factory.createStartElement(name, null, null);
            writer.add(startEl);
            QName nilAttr = new QName("http://www.w3.org/2001/XMLSchema-instance", "nil");
            Attribute attr = factory.createAttribute(nilAttr, "true");
            writer.add(attr);
            EndElement endEl = factory.createEndElement(name, null);
            writer.add(endEl);
        }
    }
View Full Code Here

Examples of javax.xml.stream.events.EndElement

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

Examples of javax.xml.stream.events.EndElement

        }
        break;
      case AUTHENTICATE:
      case READY:
        if (event.isEndElement()) {
          final EndElement element = event.asEndElement();

          if (STREAM_NAME.equals(element.getName())) {
            Channels.disconnect(ctx.getChannel());
            return;
          }
        }
        break;
      case DISCONNECTED:
        throw new Exception("received DISCONNECTED");
      }
    }
    else if (e.getMessage() instanceof XMLElement) {
      final XMLElement element = (XMLElement) e.getMessage();
     
      switch (status) {
      case AUTHENTICATE:
        if (!"handshake".equals(element.getTagName()))
          throw new Exception("expected handshake");
        status = Status.READY;
        System.out.println("logged in");
       
        ctx.getPipeline().get(XMPPStreamHandler.class).loggedIn();
View Full Code Here

Examples of javax.xml.stream.events.EndElement

        }
        //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();

          final EndElement endElement = event.asEndElement();
          final QName endElementName = endElement.getName();

          if (!startElementName.equals(endElementName)) {
            throw new IllegalArgumentException("Malformed XMLEvent stream. Expected end element for " + startElementName + " but found end element for " + endElementName);
          }
        }
View Full Code Here

Examples of javax.xml.stream.events.EndElement

                  stack.push(refEntity);
               }

               break;
            case XMLStreamConstants.END_ELEMENT :
               EndElement endElement = event.asEndElement();
               localName = endElement.getName().getLocalPart();

               if (localName.equals(REFERENCE_ELEMENT))
               {
                  RefEntity refEntity = stack.pop();
                  importedRefs.put(refEntity.getKey(), refEntity.getValue());
View Full Code Here

Examples of javax.xml.stream.events.EndElement

                  stack.push(refEntity);
               }

               break;
            case XMLStreamConstants.END_ELEMENT :
               EndElement endElement = event.asEndElement();
               localName = endElement.getName().getLocalPart();

               if (localName.equals(REFERENCE_ELEMENT))
               {
                  RefEntity refEntity = stack.pop();
                  importedRefs.put(refEntity.getKey(), refEntity.getValue());
View Full Code Here

Examples of javax.xml.stream.events.EndElement

              for (final AttributeEntry entry : tag) {
                attrs.add(eventFactory.createAttribute(entry.getKey(), entry.getValue()));
              }
              StartElement newStart = eventFactory.createStartElement(QName.valueOf(tag.getName()), attrs.iterator(),
                      null);
              EndElement newEnd = eventFactory.createEndElement(newStart.getName(), null);

              writer.add(newStart);
              writer.add(newEnd);
            }
          }
View Full Code Here

Examples of javax.xml.stream.events.EndElement

          }

        }

        if (event.isEndElement()) {
          EndElement end = event.asEndElement();

          String tag = end.getName().getLocalPart();

          if (tag.equalsIgnoreCase("reports") && report != null) {
            rule.getReportPool().put(report.getId(), report);
            continue;
          }
View Full Code Here

Examples of javax.xml.stream.events.EndElement

                  stack.push(refEntity);
               }

               break;
            case XMLStreamConstants.END_ELEMENT :
               EndElement endElement = event.asEndElement();
               localName = endElement.getName().getLocalPart();

               if (localName.equals(REFERENCE_ELEMENT))
               {
                  RefEntity refEntity = stack.pop();
                  importedRefs.put(refEntity.getKey(), refEntity.getValue());
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.