Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
libcore
Commits
87806e1d
Commit
87806e1d
authored
15 years ago
by
Elliott Hughes
Browse files
Options
Download
Email Patches
Plain Diff
Fix typos in the XmlPullParser documentation.
parent
af74d493
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
26 deletions
+25
-26
xml/src/main/java/org/xmlpull/v1/XmlPullParser.java
xml/src/main/java/org/xmlpull/v1/XmlPullParser.java
+25
-26
No files found.
xml/src/main/java/org/xmlpull/v1/XmlPullParser.java
View file @
87806e1d
...
...
@@ -8,7 +8,7 @@ import java.io.IOException;
import
java.io.Reader
;
/**
* XML Pull Parser is an interface that defines parsing functionlity provided
* XML Pull Parser is an interface that defines parsing function
a
lity provided
* in <a href="http://www.xmlpull.org/">XMLPULL V1 API</a> (visit this website to
* learn more about API and its implementations).
*
...
...
@@ -23,7 +23,7 @@ import java.io.Reader;
* then parser behaves like XML 1.0 compliant non-validating parser under condition that
* <em>no DOCDECL is present</em> in XML documents
* (internal entites can still be defined with defineEntityReplacementText()).
* This mode of operation is intened <b>for operation in constrained environments</b> such as J2ME.
* This mode of operation is inten
d
ed <b>for operation in constrained environments</b> such as J2ME.
* </ul>
*
*
...
...
@@ -45,8 +45,8 @@ import java.io.Reader;
* <p>Th following event types are seen by next()<dl>
* <dt><a href="#START_TAG">START_TAG</a><dd> An XML start tag was read.
* <dt><a href="#TEXT">TEXT</a><dd> Text content was read;
* the text content can be retr
e
ived using the getText() method.
* (when in validating mode next() will not report ignorable whitespace
s
, use nextToken() instead)
* the text content can be retri
e
ved using the getText() method.
* (when in validating mode next() will not report ignorable whitespace, use nextToken() instead)
* <dt><a href="#END_TAG">END_TAG</a><dd> An end tag was read
* <dt><a href="#END_DOCUMENT">END_DOCUMENT</a><dd> No more events are available
* </dl>
...
...
@@ -62,7 +62,7 @@ import java.io.Reader;
* getProperty("<a href="http://xmlpull.org/v1/doc/features.html#xmldecl-standalone">http://xmlpull.org/v1/doc/features.html#xmldecl-standalone</a>")
* returns Boolean: null if there was no standalone declaration
* or if property is not supported
* otherwise returns Boolean(true) if standalon="yes" and Boolean(false) when standalone="no"
* otherwise returns Boolean(true) if standalon
e
="yes" and Boolean(false) when standalone="no"
* <li><b>encoding</b>: obtained from getInputEncoding()
* null if stream had unknown encoding (not set in setInputStream)
* and it was not declared in XMLDecl
...
...
@@ -221,9 +221,9 @@ public interface XmlPullParser {
* Also, when the state was reached by calling next(), the text value will
* be normalized, whereas getText() will
* return unnormalized content in the case of nextToken(). This allows
* an exact roundtrip without ch
n
anging line ends when examining low
* an exact roundtrip without changing line ends when examining low
* level events, whereas for high level applications the text is
* normalized apropriately.
* normalized ap
p
ropriately.
*
* @see #next
* @see #nextToken
...
...
@@ -239,7 +239,7 @@ public interface XmlPullParser {
* this token is available only from calls to <a href="#nextToken()">nextToken()</a>.
* A call to next() will accumulate various text events into a single event
* of type TEXT. The text contained in the CDATA section is available
* by call
l
ing getText().
* by calling getText().
*
* @see #nextToken
* @see #getText
...
...
@@ -250,8 +250,8 @@ public interface XmlPullParser {
* An entity reference was just read;
* this token is available from <a href="#nextToken()">nextToken()</a>
* only. The entity name is available by calling getName(). If available,
* the replacement text can be obtained by calling getText
t
(); otherwise,
* the user is responsib
i
le for resolving the entity reference.
* the replacement text can be obtained by calling getText(); otherwise,
* the user is responsible for resolving the entity reference.
* This event type is never returned from next(); next() will
* accumulate the replacement text and other text
* events to a single TEXT event.
...
...
@@ -323,7 +323,7 @@ public interface XmlPullParser {
* the string "START_TAG".
*
* This array is intended for diagnostic output only. Relying
* on the contents of the array may be dangerous since malicous
* on the contents of the array may be dangerous since malic
i
ous
* applications may alter the array, although it is final, due
* to limitations of the Java language.
*/
...
...
@@ -375,7 +375,7 @@ public interface XmlPullParser {
* the DOCDECL event type is reported by nextToken()
* and ignored by next().
*
* If this featue is activated, then the document declaration
* If this featu
r
e is activated, then the document declaration
* must be processed by the parser.
*
* <p><strong>Please note:</strong> If the document type declaration
...
...
@@ -392,7 +392,7 @@ public interface XmlPullParser {
/**
* If this feature is activated, all validation errors as
* defined in the XML 1.0 s
e
pcification are reported.
* defined in the XML 1.0 sp
e
cification are reported.
* This implies that FEATURE_PROCESS_DOCDECL is true and both, the
* internal and external document type declaration will be processed.
* <p><strong>Please Note:</strong> This feature can not be changed
...
...
@@ -412,7 +412,7 @@ public interface XmlPullParser {
* <p>Example: call setFeature(FEATURE_PROCESS_NAMESPACES, true) in order
* to switch on namespace processing. The initial settings correspond
* to the properties requested from the XML Pull Parser factory.
* If none were requested, all fea
u
tures are deactivated by default.
* If none were requested, all features are deactivated by default.
*
* @exception XmlPullParserException If the feature is not supported or can not be set
* @exception IllegalArgumentException If string with the feature name is null
...
...
@@ -494,7 +494,7 @@ public interface XmlPullParser {
* If setInput(InputStream, inputEncoding) was called with an inputEncoding
* value other than null, this value must be returned
* from this method. Otherwise, if inputEncoding is null and
* the parser supp
p
orts the encoding detection feature
* the parser supports the encoding detection feature
* (http://xmlpull.org/v1/doc/features.html#detect-encoding),
* it must return the detected encoding.
* If setInput(Reader) was called, null is returned.
...
...
@@ -518,7 +518,7 @@ public interface XmlPullParser {
*
* <p><b>Please notes:</b> The given value is used literally as replacement text
* and it corresponds to declaring entity in DTD that has all special characters
* escaped: left angle bracket is replaced with &lt;, ampers
n
ad with &amp;
* escaped: left angle bracket is replaced with &lt;, ampersa
n
d with &amp;
* and so on.
*
* <p><b>Note:</b> The given value is the literal replacement text and must not
...
...
@@ -545,7 +545,7 @@ public interface XmlPullParser {
* <p><b>NOTE:</b> when parser is on END_TAG then it is allowed to call
* this function with getDepth()+1 argument to retrieve position of namespace
* prefixes and URIs that were declared on corresponding START_TAG.
* <p><b>NOTE:</b> to retrieve l
s
it of namespaces declared in current element:<pre>
* <p><b>NOTE:</b> to retrieve li
s
t of namespaces declared in current element:<pre>
* XmlPullParser pp = ...
* int nsStart = pp.getNamespaceCount(pp.getDepth()-1);
* int nsEnd = pp.getNamespaceCount(pp.getDepth());
...
...
@@ -564,7 +564,7 @@ public interface XmlPullParser {
int
getNamespaceCount
(
int
depth
)
throws
XmlPullParserException
;
/**
* Returns the namespace prefix
e
for the given position
* Returns the namespace prefix for the given position
* in the namespace stack.
* Default namespace declaration (xmlns='...') will have null as prefix.
* If the given index is out of range, an exception is thrown.
...
...
@@ -605,7 +605,7 @@ public interface XmlPullParser {
* </pre>
*
* <p><strong>Please note:</strong> parser implementations
* may provide more ef
i
fcient lookup, e.g. using a Hashtable.
* may provide more eff
i
cient lookup, e.g. using a Hashtable.
* The 'xml' prefix is bound to "http://www.w3.org/XML/1998/namespace", as
* defined in the
* <a href="http://www.w3.org/TR/REC-xml-names/#ns-using">Namespaces in XML</a>
...
...
@@ -817,7 +817,7 @@ public interface XmlPullParser {
*
* @param index zero-based index of attribute
* @return attribute namespace,
* empty string ("") is returned if names
a
pces processing is not enabled or
* empty string ("") is returned if namesp
a
ces processing is not enabled or
* namespaces processing is enabled but attribute has no namespace (it has no prefix).
*/
String
getAttributeNamespace
(
int
index
);
...
...
@@ -915,8 +915,8 @@ public interface XmlPullParser {
/**
* Get next parsing event - element content wil be coalesced and only one
* TEXT event must be returned for whole element content
* (comments and processing instructions will be ignored and e
m
tity references
* must be expanded or exception mus be thrown if entity reerence can not be ex
a
pnded).
* (comments and processing instructions will be ignored and e
n
tity references
* must be expanded or exception mus be thrown if entity re
f
erence can not be exp
a
nded).
* If element content is empty (content is "") then no TEXT event will be reported.
*
* <p><b>NOTE:</b> empty element (such as <tag/>) will be reported
...
...
@@ -963,8 +963,8 @@ public interface XmlPullParser {
* <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 r
t
eporting is optional.
* <br>Note: that element content may be del
e
vered in multiple consecutive IGNORABLE_WHITESPACE events.
* element will always reported as IGNORABLE_WHITESPACE other
w
ise reporting is optional.
* <br>Note: that element content may be del
i
vered in multiple consecutive IGNORABLE_WHITESPACE events.
* <dt>CDSECT<dd>
* return text <em>inside</em> CDATA
* (ex. 'fo<o' from <!CDATA[fo<o]]>)
...
...
@@ -1002,7 +1002,7 @@ public interface XmlPullParser {
* </dd>
* </dl>
*
* <p><strong>NOTE:</strong> there is no gurantee that there will only one TEXT or
* <p><strong>NOTE:</strong> there is no gu
a
rantee that there will only one TEXT or
* IGNORABLE_WHITESPACE event from nextToken() as parser may chose to deliver element content in
* multiple tokens (dividing element content into chunks)
*
...
...
@@ -1113,4 +1113,3 @@ public interface XmlPullParser {
int
nextTag
()
throws
XmlPullParserException
,
IOException
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment