Package org.xmlpull.v1.builder

Examples of org.xmlpull.v1.builder.XmlContainer


    /**
     * @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
     */
    @Deprecated
    public static Xpp3Dom build(final Reader reader) throws Exception {
        final XmlPullParser parser = new MXParser();
        parser.setInput(reader);
        try {
            return (Xpp3Dom)XppDom.build(parser);
        } finally {
            reader.close();
        }
View Full Code Here


    }

    @Override
    public HierarchicalStreamReader createReader(final Reader in) {
        try {
            final XmlPullParser parser = createParser();
            parser.setInput(in);
            return new XppDomReader(XppDom.build(parser), getNameCoder());
        } catch (final XmlPullParserException e) {
            throw new StreamException(e);
        } catch (final IOException e) {
            throw new StreamException(e);
View Full Code Here

            }
            else if ("iq".equals(tag)) {
                packet = getIQ(doc);
            }
            else {
                throw new XmlPullParserException("Unknown packet type was read: " + tag);
            }
            // Request the component to process the received packet
            component.processPacket(packet);
        }
    }
View Full Code Here


    private XmlPullParserException missingAttribute( String attrName )
    {
        String message = "Missing Attribute " + attrName + " in element " + this.parser.getName();
        return new XmlPullParserException( message, this.parser, null );
    }
View Full Code Here


    private XmlPullParserException unexpectedElement()
    {
        String message = "Illegal Element " + this.parser.getName();
        return new XmlPullParserException( message, this.parser, null );
    }
View Full Code Here

    log.fine("process element: " + xmlElement.getClass().getName());
    try {
     xmlElement.process(this, new Attributes(xpp));
    } catch (Exception ex) {
      if (!(ex instanceof XmlPullParserException)) {
          throw new XmlPullParserException("Error parsing document.", xpp, ex);
      } else {
        throw ex;
      }
    }
  }
View Full Code Here

        {
            int requestID = Integer.parseInt( attributeValue );

            if ( requestID == 0 )
            {
                throw new XmlPullParserException( I18n.err( I18n.ERR_03038 ), xpp, null );
            }

            return requestID;
        }
        catch ( NumberFormatException e )
        {
            throw new XmlPullParserException( I18n.err( I18n.ERR_03039 ), xpp, null );
        }
    }
View Full Code Here

    {
        BatchRequestDsml batchRequest = container.getBatchRequest();

        if ( batchRequest == null )
        {
            throw new XmlPullParserException( I18n.err( I18n.ERR_03040 ), container.getParser(), null );
        }

        return ( ( batchRequest.getProcessing() == Processing.PARALLEL ) && ( batchRequest.getResponseOrder() == ResponseOrder.UNORDERED ) );
    }
View Full Code Here

                action.action( container );
            }
        }
        else
        {
            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
        }
    }
View Full Code Here

        if ( attributeValue != null )
        {
            if ( !Oid.isOid( attributeValue ) )
            {
                throw new XmlPullParserException( I18n.err( I18n.ERR_03006 ), xpp, null );
            }

            control = container.getLdapCodecService().newControl( new OpaqueControl( attributeValue ) );
            parent.addControl( control );
        }
        else
        {
            throw new XmlPullParserException( I18n.err( I18n.ERR_03005 ), xpp, null );
        }
        // CRITICALITY
        attributeValue = xpp.getAttributeValue( "", "criticality" );

        if ( attributeValue != null )
        {
            if ( attributeValue.equals( "true" ) )
            {
                control.setCritical( true );
            }
            else if ( attributeValue.equals( "false" ) )
            {
                control.setCritical( false );
            }
            else
            {
                throw new XmlPullParserException( I18n.err( I18n.ERR_03007 ), xpp, null );
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.xmlpull.v1.builder.XmlContainer

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.