// Path: src/com/deliciousdroid/providers/BundleContent.java
// public static class Bundle implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + 
// 			BookmarkContentProvider.AUTHORITY + "/bundle");
// 		
// 	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.deliciousdroid.bundles";
// 		
// 	public static final String Name = "NAME";
// 	public static final String Tags = "TAGS";
// 	public static final String Account = "ACCOUNT";
// 		
//        private String mName;
//        private int mId = 0;
//        private String mTags;
//        private String mAccount;
// 
//        public int getId(){
//        	return mId;
//        }
//         
//        public void setId(int id){
//        	mId = id;
//        }
//         
//        public String getName() {
//            return mName;
//        }
//         
//        public void setName(String name) {
//        	mName = name;
//        }
//         
//        public String getTagString(){
//        	return mTags;
//        }
//         
//        public void setTagString(String tags) {
//        	mTags = tags;
//        }
//         
//        public ArrayList<String> getTags(){
// 		ArrayList<String> result = new ArrayList<String>();
// 		for(String s : this.getTagString().split(" ")) {
// 			result.add(s);
// 		}
// 			
// 		return result;
//        }
//         
//        public String getAccount(){
//        	return mAccount;
//        }
//         
//        public void setAccount(String account) {
//        	mAccount = account;
//        }
//         
//         
//        public Bundle() {
//         	
//        }
//         
//        public Bundle(String name) {
//            mName = name;
//        }
//         
//        public Bundle(String name, String tags) {
//            mName = name;
//            mTags = tags;
//        }
//         
//        public Bundle copy(){
//        	Bundle t = new Bundle();
//        	t.mId = this.mId;
//        	t.mName = this.mName;
//        	t.mTags = this.mTags;
//        	return t;
//        }
// }


import com.deliciousdroid.providers.BundleContent.Bundle;
import java.io.InputStream;
import java.text.ParseException;
import java.util.ArrayList;
import org.xml.sax.Attributes;
import android.sax.RootElement;
import android.sax.StartElementListener;
import android.util.Xml;
/*
 * DeliciousDroid - http://code.google.com/p/DeliciousDroid/
 *
 * Copyright (C) 2010 Matt Schmidt
 *
 * DeliciousDroid is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation; either version 3 of the License,
 * or (at your option) any later version.
 *
 * DeliciousDroid is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DeliciousDroid; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */

package com.deliciousdroid.xml;





public class SaxBundleParser {

	private InputStream is;
	
    public SaxBundleParser(InputStream stream) {
    	is = stream;
    }

// Path: src/com/deliciousdroid/providers/BundleContent.java
// public static class Bundle implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + 
// 			BookmarkContentProvider.AUTHORITY + "/bundle");
// 		
// 	public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.deliciousdroid.bundles";
// 		
// 	public static final String Name = "NAME";
// 	public static final String Tags = "TAGS";
// 	public static final String Account = "ACCOUNT";
// 		
//        private String mName;
//        private int mId = 0;
//        private String mTags;
//        private String mAccount;
// 
//        public int getId(){
//        	return mId;
//        }
//         
//        public void setId(int id){
//        	mId = id;
//        }
//         
//        public String getName() {
//            return mName;
//        }
//         
//        public void setName(String name) {
//        	mName = name;
//        }
//         
//        public String getTagString(){
//        	return mTags;
//        }
//         
//        public void setTagString(String tags) {
//        	mTags = tags;
//        }
//         
//        public ArrayList<String> getTags(){
// 		ArrayList<String> result = new ArrayList<String>();
// 		for(String s : this.getTagString().split(" ")) {
// 			result.add(s);
// 		}
// 			
// 		return result;
//        }
//         
//        public String getAccount(){
//        	return mAccount;
//        }
//         
//        public void setAccount(String account) {
//        	mAccount = account;
//        }
//         
//         
//        public Bundle() {
//         	
//        }
//         
//        public Bundle(String name) {
//            mName = name;
//        }
//         
//        public Bundle(String name, String tags) {
//            mName = name;
//            mTags = tags;
//        }
//         
//        public Bundle copy(){
//        	Bundle t = new Bundle();
//        	t.mId = this.mId;
//        	t.mName = this.mName;
//        	t.mTags = this.mTags;
//        	return t;
//        }
// }


// Path: src/com/deliciousdroid/xml/SaxBundleParser.java
import com.deliciousdroid.providers.BundleContent.Bundle;
import java.io.InputStream;
import java.text.ParseException;
import java.util.ArrayList;
import org.xml.sax.Attributes;
import android.sax.RootElement;
import android.sax.StartElementListener;
import android.util.Xml;

/*
 * DeliciousDroid - http://code.google.com/p/DeliciousDroid/
 *
 * Copyright (C) 2010 Matt Schmidt
 *
 * DeliciousDroid is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation; either version 3 of the License,
 * or (at your option) any later version.
 *
 * DeliciousDroid is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DeliciousDroid; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */

package com.deliciousdroid.xml;





public class SaxBundleParser {

	private InputStream is;
	
    public SaxBundleParser(InputStream stream) {
    	is = stream;
    }

    public ArrayList<Bundle> parse() throws ParseException {