omorandi / TiXml2Json

Xml2JSON module for Titanium mobile on iOS
Other
11 stars 6 forks source link

Android version? #3

Open AppWerft opened 9 years ago

AppWerft commented 9 years ago

I know there is no ready version for it. Do you know a android native version?

nuno commented 8 years ago

@AppWerft did you found Android version?

AppWerft commented 8 years ago

Hm. it is not easy. Of you found a native lib, I can build a module.

nuno commented 8 years ago

@AppWerft I use https://github.com/dbankier/XMLTools-For-Appcelerator-Titanium from @dbankier but I wonder the difference from a native module? Have you test this module o iOS by change?

AppWerft commented 8 years ago

I have no tested, it is pure javascript. Do you have an issue with iOS?

AppWerft commented 8 years ago

I can build a native Android module (Ti.RestXML?). I'm using this in my Ti.Airlino module. This will be faster as Davids module. It only works for little xml.

nuno commented 8 years ago

I use @dbankier lib for convert the data from net requests that come back as xml, so I convert as json to easy manage. This app eats huge xml data, it come back as 24 items at the time, I'm using pagination on the app. I have to test the module, but not sure how faster will be.

omorandi commented 8 years ago

Hi @nuno & @AppWerft. I'm almost sure that at some point I developed the android counterpart of this module, but I never published it... I'll need to check out in my old archives to see if it's still there, and I'll let you know...

nuno commented 8 years ago

Unfortunately in my case it does not work, the xml come from network call I get

[ERROR] Script Error { [ERROR] column = 39; [ERROR] line = 209; [ERROR] message = "Expected blob or string argument"; [ERROR] stack = "[native code]\nonload"; [ERROR] }

AppWerft commented 8 years ago

Here is the Android version. This module uses json-java to parse. On my NEXUS5: ca. 10 ms for 30kB XML. The library parses the string. Maybe a solution on base XML document (SAX) is faster.