1 2 4 package org.xmlpull.v1; 5 6 import java.io.InputStream ; 7 import java.io.IOException ; 8 import java.io.Reader ; 9 10 140 141 public interface XmlPullParser { 142 143 144 public static final String NO_NAMESPACE = ""; 145 146 149 158 public final static int START_DOCUMENT = 0; 159 160 171 public final static int END_DOCUMENT = 1; 172 173 194 public final static int START_TAG = 2; 195 196 210 public final static int END_TAG = 3; 211 212 213 232 public final static int TEXT = 4; 233 234 237 247 public final static int CDSECT = 5; 248 249 262 public final static int ENTITY_REF = 6; 263 264 284 public static final int IGNORABLE_WHITESPACE = 7; 285 286 294 public static final int PROCESSING_INSTRUCTION = 8; 295 296 306 public static final int COMMENT = 9; 307 308 317 public static final int DOCDECL = 10; 318 319 330 public static final String [] TYPES = { 331 "START_DOCUMENT", 332 "END_DOCUMENT", 333 "START_TAG", 334 "END_TAG", 335 "TEXT", 336 "CDSECT", 337 "ENTITY_REF", 338 "IGNORABLE_WHITESPACE", 339 "PROCESSING_INSTRUCTION", 340 "COMMENT", 341 "DOCDECL" 342 }; 343 344 345 348 357 public static final String FEATURE_PROCESS_NAMESPACES = 358 "http://xmlpull.org/v1/doc/features.html#process-namespaces"; 359 360 369 public static final String FEATURE_REPORT_NAMESPACE_ATTRIBUTES = 370 "http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes"; 371 372 390 public static final String FEATURE_PROCESS_DOCDECL = 391 "http://xmlpull.org/v1/doc/features.html#process-docdecl"; 392 393 404 public static final String FEATURE_VALIDATION = 405 "http://xmlpull.org/v1/doc/features.html#validation"; 406 407 420 public void setFeature(String name, 421 boolean state) throws XmlPullParserException; 422 423 432 433 public boolean getFeature(String name); 434 435 440 public void setProperty(String name, 441 Object value) throws XmlPullParserException; 442 443 453 public Object getProperty(String name); 454 455 456 465 public void setInput(Reader in) throws XmlPullParserException; 466 467 468 486 public void setInput(InputStream inputStream, String inputEncoding) 487 throws XmlPullParserException; 488 489 499 public String getInputEncoding(); 500 501 532 public void defineEntityReplacementText( String entityName, 533 String replacementText ) throws XmlPullParserException; 534 535 549 public int getNamespaceCount(int depth) throws XmlPullParserException; 550 551 560 public String getNamespacePrefix(int pos) throws XmlPullParserException; 561 562 569 public String getNamespaceUri(int pos) throws XmlPullParserException; 570 571 603 public String getNamespace (String prefix); 604 605 606 609 626 public int getDepth(); 627 628 635 636 public String getPositionDescription (); 637 638 639 646 public int getLineNumber(); 647 648 655 public int getColumnNumber(); 656 657 658 661 676 677 public boolean isWhitespace() throws XmlPullParserException; 678 679 697 public String getText (); 698 699 700 725 public char[] getTextCharacters(int [] holderForStartAndLength); 726 727 730 738 public String getNamespace (); 739 740 752 public String getName(); 753 754 761 762 public String getPrefix(); 763 764 771 public boolean isEmptyElementTag() throws XmlPullParserException; 772 773 776 785 public int getAttributeCount(); 786 787 810 public String getAttributeNamespace (int index); 811 812 821 public String getAttributeName (int index); 822 823 833 public String getAttributePrefix(int index); 834 835 842 public String getAttributeType(int index); 843 844 852 public boolean isAttributeDefault(int index); 853 854 869 public String getAttributeValue(int index); 870 871 887 public String getAttributeValue(String namespace, 888 String name); 889 890 893 899 public int getEventType() 900 throws XmlPullParserException; 901 902 920 921 public int next() 922 throws XmlPullParserException, IOException ; 923 924 925 1013 1014 public int nextToken() 1015 throws XmlPullParserException, IOException ; 1016 1017 1020 1036 public void require(int type, String namespace, String name) 1037 throws XmlPullParserException, IOException ; 1038 1039 1082 public String nextText() throws XmlPullParserException, IOException ; 1083 1084 1101 public int nextTag() throws XmlPullParserException, IOException ; 1102 1103} 1104 1105 | Popular Tags |