/* -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- //------100-columns-wide------>|*/
// for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/)
package org.xmlpull.v1;
import java.io.InputStream;
import java.io.IOException;
import java.io.Reader;
/**
* XML Pull Parser is an interface that defines parsing functionlity provided
* in <a href="http://www.xmlpull.org/">XMLPULL V1 API</a> (visit this website to
* learn more about API and its implementations).
*
* <p>There are following different
* kinds of parser depending on which features are set:<ul>
* <li><b>non-validating</b> parser as defined in XML 1.0 spec when
* FEATURE_PROCESS_DOCDECL is set to true
* <li><b>validating parser</b> as defined in XML 1.0 spec when
* FEATURE_VALIDATION is true (and that implies that FEATURE_PROCESS_DOCDECL is true)
* <li>when FEATURE_PROCESS_DOCDECL is false (this is default and
* if different value is required necessary must be changed before parsing is started)
* 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.
* </ul>
*
*
* <p>There are two key methods: next() and nextToken(). While next() provides
* access to high level parsing events, nextToken() allows access to lower
* level tokens.
*
* <p>The current event state of the parser
* can be determined by calling the
* <a href="#getEventType()">getEventType()</a> method.
* Initially, the parser is in the <a href="#START_DOCUMENT">START_DOCUMENT</a>
* state.
*
* <p>The method <a href="#next()">next()</a> advances the parser to the
* next event. The int value returned from next determines the current parser
* state and is identical to the value returned from following calls to
* getEventType ().
*
* <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 retreived using the getText() method.
* (when in validating mode next() will not report ignorable whitespaces, 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>
*
* <p>after first next() or nextToken() (or any other next*() method)
* is called user application can obtain
* XML version, standalone and encoding from XML declaration
* in following ways:<ul>
* <li><b>version</b>:
* getProperty("<a href="http://xmlpull.org/v1/doc/properties.html#xmldecl-version">http://xmlpull.org/v1/doc/properties.html#xmldecl-version</a>")
* returns String ("1.0") or null if XMLDecl was not read or if property is not supported
* <li><b>standalone</b>:
* 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"
* <li><b>encoding</b>: obtained from getInputEncoding()
* null if stream had unknown encoding (not set in setInputStream)
* and it was not declared in XMLDecl
* </ul>
*
* A minimal example for using this API may look as follows:
* <pre>
* import java.io.IOException;
* import java.io.StringReader;
*
* import org.xmlpull.v1.XmlPullParser;
* import org.xmlpull.v1.<a href="XmlPullParserException.html">XmlPullParserException.html</a>;
* import org.xmlpull.v1.<a href="XmlPullParserFactory.html">XmlPullParserFactory</a>;
*
* public class SimpleXmlPullApp
* {
*
* public static void main (String args[])
* throws XmlPullParserException, IOException
* {
* XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
* factory.setNamespaceAware(true);
* XmlPullParser xpp = factory.newPullParser();
*
* xpp.<a href="#setInput">setInput</a>( new StringReader ( "<foo>Hello World!</foo>" ) );
* int eventType = xpp.getEventType();
* while (eventType != XmlPullParser.END_DOCUMENT) {
* if(eventType == XmlPullParser.START_DOCUMENT) {
* System.out.println("Start document");
* } else if(eventType == XmlPullParser.END_DOCUMENT) {
* System.out.println("End document");
* } else if(eventType == XmlPullParser.START_TAG) {
* System.out.println("Start tag "+xpp.<a href="#getName()">getName()</a>);
* } else if(eventType == XmlPullParser.END_TAG) {
* System.out.println("End tag "+xpp.getName());
* } else if(eventType == XmlPullParser.TEXT) {
* System.out.println("Text "+xpp.<a href="#getText()">getText()</a>);
* }
* eventType = xpp.next();
* }
* }
* }
* </pre>
*
* <p>The above example will generate the following output:
* <pre>
* Start document
* Start tag foo
* Text Hello World!
* End tag foo
* </pre>
*
* <p>For more details on API usage, please refer to the
* quick Introduction available at <a href="http://www.xmlpull.org">http://www.xmlpull.org</a>
*
* @see XmlPullParserFactory
* @see #defineEntityReplacementText
* @see #getName
* @see #getNamespace
* @see #getText
* @see #next
* @see #nextToken
* @see #setInput
* @see #FEATURE_PROCESS_DOCDECL
* @see #FEATURE_VALIDATION
* @see #START_DOCUMENT
* @see #START_TAG
* @see #TEXT
* @see #END_TAG
* @see #END_DOCUMENT
*
* @author <a href="http://www-ai.cs.uni-dortmund.de/PERSONAL/haustein.html">Stefan Haustein</a>
* @author <a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a>
*/
public interface XmlPullParser {
/** This constant represents the default namespace (empty string "") */
String NO_NAMESPACE = "";
// ----------------------------------------------------------------------------
// EVENT TYPES as reported by next()
/**
* Signalize that parser is at the very beginning of the document
* and nothing was read yet.
* This event type can only be observed by calling getEvent()
* before the first call to next(), nextToken, or nextTag()</a>).
*
* @see #next
* @see #nextToken
*/
int START_DOCUMENT = 0;
/**
* Logical end of the xml document. Returned from getEventType, next()
* and nextToken()
* when the end of the input document has been reached.
* <p><strong>NOTE:</strong> calling again
* <a href="#next()">next()</a> or <a href="#nextToken()">nextToken()</a>
* will result in exception being thrown.
*
* @see #next
* @see #nextToken
*/
int END_DOCUMENT = 1;
/**
* Returned from getEventType(),
* <a href="#next()">next()</a>, <a href="#nextToken()">nextToken()</a> when
* a start tag was read.
* The name of start tag is available from getName(), its namespace and prefix are
* available from getNamespace() and getPrefix()
* if <a href='#FEATURE_PROCESS_NAMESPACES'>namespaces are enabled</a>.
* See getAttribute* methods to retrieve element attributes.
* See getNamespace* methods to retrieve newly declared namespaces.
*
* @see #next
* @see #nextToken
* @see #getName
* @see #getPrefix
* @see #getNamespace
* @see #getAttributeCount
* @see #getDepth
* @see #getNamespaceCount
* @see #getNamespace
* @see #FEATURE_PROCESS_NAMESPACES
*/
int START_TAG = 2;
/**
* Returned from getEventType(), <a href="#next()">next()</a>, or
* <a href="#nextToken()">
没有合适的资源?快使用搜索试试~ 我知道了~
手机看交通监视器实时录像源码
共147个文件
java:72个
class:40个
png:6个
4星 · 超过85%的资源 需积分: 9 9 下载量 64 浏览量
2009-07-15
14:14:13
上传
评论 1
收藏 277KB RAR 举报
温馨提示
手 机 看 交 通 监 视 器 实 时 录 像 源 码
资源推荐
资源详情
资源评论
收起资源包目录
手机看交通监视器实时录像源码 (147个子文件)
ThreadGetVideo.class 9KB
ThreadGetVideo.class 8KB
GUIController.class 7KB
GUIController.class 7KB
CommandResources.class 6KB
CommandResources.class 6KB
RmsFacade.class 5KB
FormTrafficCam.class 5KB
RmsFacade.class 5KB
FormTrafficCam.class 5KB
WaitFlash.class 4KB
WaitFlash.class 4KB
StringVector.class 4KB
StringVector.class 3KB
FormSetting.class 3KB
FormSetting.class 3KB
VideoSettings.class 3KB
VideoSettings.class 3KB
Base64.class 3KB
TrafficView.class 3KB
TrafficView.class 3KB
Base64.class 3KB
MainMenuList.class 2KB
MainMenuList.class 2KB
MarshalBase64.class 2KB
MarshalBase64.class 2KB
FormSetting$FormSettingListener.class 2KB
MainMenuList$MainMenuListListener.class 2KB
FormSetting$FormSettingListener.class 2KB
MainMenuList$MainMenuListListener.class 2KB
FormTrafficCam$FormTrafficCamListener.class 1KB
FormTrafficCam$FormTrafficCamListener.class 1KB
WaitFlash$FormPostProgressListener.class 1KB
WaitFlash$FormPostProgressListener.class 1KB
GUIController$EventID.class 1KB
GUIController$EventID.class 1KB
About.class 826B
About.class 826B
WaitFlash$1.class 787B
WaitFlash$1.class 787B
.classpath 432B
.classpath 432B
.classpath 432B
.eclipseme 230B
.eclipseme 230B
.eclipseme 230B
Entries 245B
Entries 204B
Entries 188B
Entries 185B
TrafficCam.jad 361B
TrafficCam.jad 338B
TrafficCam.jad 338B
TrafficCam.jar 53KB
XmlPullParser.java 44KB
KXmlParser.java 39KB
SoapSerializationEnvelope.java 23KB
XmlParser.java 16KB
KXmlSerializer.java 15KB
GUIController.java 15KB
XmlSerializer.java 15KB
XmlPullParserFactory.java 13KB
ThreadGetVideo.java 12KB
Node.java 11KB
RmsFacade.java 10KB
HttpTransport.java 10KB
HttpTransport.java 10KB
SoapEnvelope.java 10KB
Node.java 9KB
Element.java 9KB
Element.java 9KB
SoapParser.java 8KB
FormTrafficCam.java 8KB
CommandResources.java 8KB
ClassMap.java 6KB
VideoSettings.java 6KB
SoapObject.java 6KB
XmlWriter.java 6KB
MarshalHashtable.java 5KB
SoapObject.java 5KB
MarshalHashtable.java 5KB
SoapEnvelope.java 5KB
WaitFlash.java 5KB
ParseEvent.java 5KB
SoapWriter.java 5KB
AbstractXmlParser.java 5KB
FormSetting.java 5KB
IsoDate.java 5KB
MainMenuList.java 4KB
TrafficView.java 4KB
AbstractXmlWriter.java 4KB
Document.java 4KB
Base64.java 4KB
Base64.java 4KB
StringVector.java 4KB
StartTag.java 4KB
Xml.java 4KB
SoapFault.java 3KB
PropertyInfo.java 3KB
Soap.java 3KB
共 147 条
- 1
- 2
资源评论
- aszhangzhao12013-05-14java写的。。不是我想要的
anyshe
- 粉丝: 6
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- mysql 5.7.15 安装配置方法图文教程.zip
- 基于springboot websocket 定制,主要完成的功能是WebSocket的状态管理,具备单机和集群能力.zip
- SpringBoot框架示例:整合SpringMVC、MyBatis、安全框架Shiro、页面布局框架Sitemesh.zip
- SpringBoot集成thumbnailator图片压缩.zip
- SpringBoot发送邮件神器,只需简单配置即可,支持自定义模板.zip
- SpringBoot的定时调用的加强工具,实现定时任务动态管理,后续加入可视化管理、调度日志、集群任务统一管理.zip
- springboot-starter-gemini 一个基于gemini提供的springboot sdk.zip
- springboot+vue实现简单的前后端分离.zip
- Springboot、SpringCloud开发脚手架,集合各种常用框架使用案例.zip
- SpringBoot 全家桶 - 本项目对目前Web开发中常用的各个技术,通过和SpringBoot的集成.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功