CVS Update: xmlpull-api-v1/src/java/tests/org/xmlpull/v1/tests
Aleksander Andrzej Slominski <[email protected]>
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
aslom 02/09/11 11:55:43
Modified: src/java/api/org/xmlpull/v1 XmlPullParser.java
src/java/tests/org/xmlpull/v1/tests TestSerializeWithNs.java
Log:
based on comments by Elliotte Rusty Harold
clarified description of getText() to reference nextToken()
ofr list of possible values returned.
Revision Changes Path
1.70 +15 -2 xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParser.java
Index: XmlPullParser.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParser.java,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -t -w -r1.69 -r1.70
--- XmlPullParser.java 2002/09/08 19:56:42 1.69
+++ XmlPullParser.java 2002/09/11 16:55:42 1.70
@@ -679,10 +679,21 @@
/**
* Returns the text content of the current event as String.
+ * The value returned depends on current event type,
+ * for example for TEXT event it is element content
+ * (this is typical case when next() is used).
+ *
+ * See description of nextToken() for detailed description of
+ * possible returned values for different types of events.
+ *
* <p><strong>NOTE:</strong> in case of ENTITY_REF, this method returns
* the entity replacement text (or null if not available). This is
* the only case where
* getText() and getTextCharacters() return different values.
+ *
+ * @see #getEventType
+ * @see #next
+ * @see #nextToken
*/
public String getText ();
@@ -690,7 +701,7 @@
/**
* Returns the buffer that contains the text of the current event,
* as well as the start offset and length relevant for the current
- * event.
+ * event. See getText(), next() and nextToken() for description of possible returned values.
*
* <p><strong>Please note:</strong> this buffer must not
* be modified and its content MAY change after a call to
@@ -704,6 +715,8 @@
* and length).
*
* @see #getText
+ * @see #next
+ * @see #nextToken
*
* @param holderForStartAndLength Must hold an 2-element int array
* into which the start offset and length values will be written.
@@ -935,7 +948,7 @@
* <dt>END_TAG<dd>null unless FEATURE_XML_ROUNDTRIP
* id enabled and then returns XML tag, ex: </tag>
* <dt>TEXT<dd>return element content.
- * <br>Note: that element content may be delevered in multiple consecutive TEXT events.
+ * <br>Note: that element content may be delivered in multiple consecutive TEXT events.
* <dt>IGNORABLE_WHITESPACE<dd>return characters that are determined to be ignorable white
* space. If the FEATURE_XML_ROUNDTRIP is enabled all whitespace content outside root
* element will always reported as IGNORABLE_WHITESPACE otherise rteporting is optional.
1.8 +1 -1 xmlpull-api-v1/src/java/tests/org/xmlpull/v1/tests/TestSerializeWithNs.java
Index: TestSerializeWithNs.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/tests/org/xmlpull/v1/tests/TestSerializeWithNs.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -t -w -r1.7 -r1.8
--- TestSerializeWithNs.java 2002/09/11 04:55:59 1.7
+++ TestSerializeWithNs.java 2002/09/11 16:55:43 1.8
@@ -181,7 +181,7 @@
ser.ignorableWhitespace(iws);
ser.startTag(null, "foo");
//check escaping & < > " '
- final String attrVal = "attrVal&<>\"&";
+ final String attrVal = "attrVal&<>\"''&";
//final String attrVal = "attrVal&;";
ser.attribute(null, "attrName", attrVal);
ser.entityRef("amp");