Android Open Source - Mobisevera S3 Pull Parser






From Project

Back to project page Mobisevera.

License

The source code is released under:

Apache License

If you think the Android project Mobisevera listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.digitalfingertip.mobisevera;
/*  w w  w  . j  a v a  2s . c  om*/
import java.io.IOException;
import java.io.StringReader;
import java.util.LinkedList;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

import android.util.Log;

public class S3PullParser {

  private static final String TAG = "Sevedroid";
  private XmlPullParser xpp = null;
  
  public void parseSoapEnvelope(String envelope) {
    try {
      XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
      if(xpp == null) {
        xpp = factory.newPullParser();
      }
      xpp.setInput(new StringReader(envelope));
      this.ProcessDocument(xpp);
    } catch (XmlPullParserException e) {
      Log.e(TAG, "Failed to parse:"+e.getMessage());
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
  
  public void ProcessDocument(XmlPullParser xpp) throws XmlPullParserException, IOException {
    int eventType = xpp.getEventType();
    while(eventType != XmlPullParser.END_DOCUMENT) {
      if(eventType == XmlPullParser.START_DOCUMENT) {
                System.out.println("Start document");
            } else if(eventType == XmlPullParser.START_TAG) {
                System.out.println("Start tag "+xpp.getName());
            } else if(eventType == XmlPullParser.END_TAG) {
                System.out.println("End tag "+xpp.getName());
            } else if(eventType == XmlPullParser.TEXT) {
                System.out.println("Text "+xpp.getText());
            }
            eventType = xpp.next();
    }
  }

  public static LinkedList<S3CaseContainer> parseAllCasesXML(
      String allCasesXml) {
    return null;
  }
  
}




Java Source Code List

com.digitalfingertip.mobisevera.MobiseveraCommsUtils.java
com.digitalfingertip.mobisevera.MobiseveraConstants.java
com.digitalfingertip.mobisevera.MobiseveraContentStore.java
com.digitalfingertip.mobisevera.MobiseveraNaviAdapter.java
com.digitalfingertip.mobisevera.MobiseveraNaviContainer.java
com.digitalfingertip.mobisevera.S3CaseContainer.java
com.digitalfingertip.mobisevera.S3CaseItem.java
com.digitalfingertip.mobisevera.S3HourEntryContainer.java
com.digitalfingertip.mobisevera.S3HourEntryItem.java
com.digitalfingertip.mobisevera.S3NamespaceContext.java
com.digitalfingertip.mobisevera.S3PhaseContainer.java
com.digitalfingertip.mobisevera.S3PhaseItem.java
com.digitalfingertip.mobisevera.S3PullParser.java
com.digitalfingertip.mobisevera.S3UserContainer.java
com.digitalfingertip.mobisevera.S3WorkTypeContainer.java
com.digitalfingertip.mobisevera.S3WorkTypeItem.java
com.digitalfingertip.mobisevera.activity.ListHourEntries.java
com.digitalfingertip.mobisevera.activity.MobiseveraClaimActivity.java
com.digitalfingertip.mobisevera.activity.MobiseveraConfig.java
com.digitalfingertip.mobisevera.activity.MobiseveraFrontpageActivity.java
com.digitalfingertip.mobisevera.activity.MobiseveraProjectActivity.java
com.digitalfingertip.mobisevera.activity.MobiseveraSelectPhase.java
com.digitalfingertip.mobisevera.activity.MobiseveraSelectProject.java
com.digitalfingertip.mobisevera.activity.MobiseveraSelectWorktype.java
com.digitalfingertip.mobisevera.activity.QueryHourEntries.java