protected char skipS( char ch ) throws XmlPullParserException, IOException { while ( isS( ch ) ) { ch = more(); } // skip additional spaces return ch; }
protected char requireInput( char ch, char[] input ) throws XmlPullParserException, IOException { for ( char anInput : input ) { if ( ch != anInput ) { throw new XmlPullParserException( "expected " + printable( anInput ) + " in " + new String( input ) + " and not " + printable( ch ), this, null ); } ch = more(); } return ch; }
char ch = more(); if ( ch != 'O' ) throw new XmlPullParserException( "expected <!DOCTYPE", this, null ); ch = more(); if ( ch != 'C' ) throw new XmlPullParserException( "expected <!DOCTYPE", this, null ); ch = more(); if ( ch != 'T' ) throw new XmlPullParserException( "expected <!DOCTYPE", this, null ); ch = more(); if ( ch != 'Y' ) throw new XmlPullParserException( "expected <!DOCTYPE", this, null ); ch = more(); if ( ch != 'P' ) throw new XmlPullParserException( "expected <!DOCTYPE", this, null ); ch = more(); if ( ch != 'E' ) throw new XmlPullParserException( "expected <!DOCTYPE", this, null ); while ( true ) ch = more(); if ( ch == '[' ) ++bracketLevel;
protected char requireNextS() throws XmlPullParserException, IOException { final char ch = more(); if ( !isS( ch ) ) { throw new XmlPullParserException( "white space is required and not " + printable( ch ), this, null ); } return skipS( ch ); }
char ch = more(); if ( ch != 'C' ) throw new XmlPullParserException( "expected <[CDATA[ for comment start", this, null ); ch = more(); if ( ch != 'D' ) throw new XmlPullParserException( "expected <[CDATA[ for comment start", this, null ); ch = more(); if ( ch != 'A' ) throw new XmlPullParserException( "expected <[CDATA[ for comment start", this, null ); ch = more(); if ( ch != 'T' ) throw new XmlPullParserException( "expected <[CDATA[ for comment start", this, null ); ch = more(); if ( ch != 'A' ) throw new XmlPullParserException( "expected <[CDATA[ for comment start", this, null ); ch = more(); if ( ch != '[' ) throw new XmlPullParserException( "expected <![CDATA[ for comment start", this, null ); ch = more(); if ( ch == ']' )
char ch = more(); ch = skipS( ch ); if ( ch == 'e' ) ch = more(); ch = requireInput( ch, NCODING ); ch = skipS( ch ); ch = more(); ch = skipS( ch ); if ( ch != '\'' && ch != '"' ) ch = more(); ch = more(); while ( ch != quotChar ) ch = more(); ch = more(); ch = more(); ch = requireInput( ch, TANDALONE ); ch = skipS( ch ); ch = more(); ch = skipS( ch ); if ( ch != '\'' && ch != '"' )
while ( true ) ch = more(); if ( !isNameChar( ch ) ) break; ch = more(); throw new XmlPullParserException( "repeated / in tag declaration", this, null ); emptyElementTag = true; ch = more(); if ( ch != '>' ) throw new XmlPullParserException( "expected > to end empty tag not " + printable( ch ), this, ch = more(); continue;
protected char skipS(char ch) throws XmlPullParserException, IOException { while(isS(ch)) { ch = more(); } // skip additional spaces return ch; }
protected char requireInput(char ch, char[] input) throws XmlPullParserException, IOException { for (int i = 0; i < input.length; i++) { if(ch != input[i]) { throw new XmlPullParserException( "expected "+printable(input[i])+" in "+new String(input) +" and not "+printable(ch), this, null); } ch = more(); } return ch; }
protected char requireNextS() throws XmlPullParserException, IOException { final char ch = more(); if(!isS(ch)) { throw new XmlPullParserException( "white space is required and not "+printable(ch), this, null); } return skipS(ch); }