Android Open Source - Google-Directions-Android X M L Parser






From Project

Back to project page Google-Directions-Android.

License

The source code is released under:

Copyright (c) 2013 Joel Dean Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software...

If you think the Android project Google-Directions-Android 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.directions.route;
//by Haseem Saheed/* www.  j  av a  2s  .  co  m*/

import android.util.Log;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;

public class XMLParser {
    // names of the XML tags
    protected static final String MARKERS = "markers";
    protected static final String MARKER = "marker";

    protected URL feedUrl;

    protected XMLParser(final String feedUrl) {
        try {
            this.feedUrl = new URL(feedUrl);
        } catch (MalformedURLException e) {
            Log.e("Routing Error", e.getMessage());
        }
    }

    protected InputStream getInputStream() {
        try {
            return feedUrl.openConnection().getInputStream();
        } catch (IOException e) {
            Log.e("Routing Error", e.getMessage());
            return null;
        }
    }
}




Java Source Code List

com.directions.android.MyActivity.java
com.directions.route.GoogleParser.java
com.directions.route.Parser.java
com.directions.route.Route.java
com.directions.route.RoutingListener.java
com.directions.route.Routing.java
com.directions.route.Segment.java
com.directions.route.XMLParser.java