Android Open Source - Wallpaper My Parser






From Project

Back to project page Wallpaper.

License

The source code is released under:

?????? ????? ?????? ?????? ?????????? ????????? 1.?????? ???????? ??????? ??????? ????? ?????? ????? ?????????...

If you think the Android project Wallpaper 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 net.uyghurdev.app.wallpaper;
/*from  w w w.  j a v a 2 s .co  m*/

import java.net.URL;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
//import android.content.res.Resources;
public class MyParser {
  
  SitesList sitesList = null;
  public void parserXML(String urlStr,String fileName)
  {
    
    try {
          
           /** Handling XML */

    SAXParserFactory spf = SAXParserFactory.newInstance();
        SAXParser sp = spf.newSAXParser();
        XMLReader xr = sp.getXMLReader();
        
       /** Send URL to parse XML Tags */
        URL sourceUrl = new URL(
        "http://www.androidpeople.com/wp-content/uploads/2010/06/example.xml");
        
       /** Create handler to handle XML Tags ( extends DefaultHandler ) */
        MyXMLHandler myXMLHandler = new MyXMLHandler();
        xr.setContentHandler(myXMLHandler);
        xr.parse(new InputSource(sourceUrl.openStream()));
        
       } catch (Exception e) {
        e.toString();
        }


       
  }

}




Java Source Code List

net.uyghurdev.app.wallpaper.About.java
net.uyghurdev.app.wallpaper.DownloadFile.java
net.uyghurdev.app.wallpaper.ImageAdapter.java
net.uyghurdev.app.wallpaper.MyParser.java
net.uyghurdev.app.wallpaper.MyXMLHandler.java
net.uyghurdev.app.wallpaper.SitesList.java
net.uyghurdev.app.wallpaper.SplashActivity.java
net.uyghurdev.app.wallpaper.Wallpaper.java