Re: [Simple-support] Error on using simplexml on android
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2012-08-06 22:40:51
|
Ignore this error, this has no impact on the use of Simple. What happening here is the library has a preference order, StAX, then XmlPull, then Dom. Android uses XmlPull, so this is loaded when StAX fails.
--- On Mon, 6/8/12, Alex Cutovoi <mob...@gm...> wrote:
From: Alex Cutovoi <mob...@gm...>
Subject: [Simple-support] Error on using simplexml on android
To: sim...@li...
Received: Monday, 6 August, 2012, 12:03 PM
Hi for all.
I'm using the simplexml to write on android a simple class. I've followed the tutorials on the site. Below is one of the classes I want to insert:@Root(name="news-sites")
private class NewsSites{ @Element private Site site = null;
@ElementList private ArrayList<Site>siteList;
public NewsSites(){ siteList = new ArrayList<Site>(0);
} public void addSite(Site site){
siteList.add(site); } }
Very simple. This is the way I insert: try{ File file = new File(path+"/"+fileName);
Log.i("INFO", "1"); if(!file.exists()){ file = new File(path+"/"+fileName);
Log.i("INFO", "2"); //file.createNewFile(); Log.i("INFO", "3");
serializer.write(newsSites, file); Log.i("INFO", "4");
} Log.i("INFO", "WRITED");
}
But, this produces the following error.
08-06 15:57:56.832: I/dalvikvm(8861): Could not find method javax.xml.stream.XMLInputFactory.createXMLEventReader, referenced from method org.simpleframework.xml.stream.StreamProvider.provide
I believe it's because android doesn't have support for Stax. This is strange because simpleframework, when compiled, needs stax jars.
Do I need to force the insertion of Stax?
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|