I have read about the problem in the SAX parser (sometimes it can return only chunck of data: it's up to the developer to handle this).
I'd like to understand why my class acts very well when I use it in the command line but it truncate the text if I use it into android.
Of course the data are the same in both cases.
Does it depends to the virtual machine?
Thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
Not all SAX implementations work exactly the same, which is fine as long as they conform to the SAX javadocs. It sounds as if you're hitting the problem described at the top of the XmlFaq; see that page for more details.
Ulf Dittmer wrote:Not all SAX implementations work exactly the same, which is fine as long as they conform to the SAX javadocs. It sounds as if you're hitting the problem described at the top of the XmlFaq; see that page for more details.
Thanks Ulf, indeed I had that problem and I bumped into a lot of posts about it!
I resolved it quite soon, but I was surprise to see different behaviors between "linux command line" and "android emulator" (please forgive me for these terms! )
I am following "Head First Android delevopment" book and I spent about 10 hours to fix the first "ready bake code"!!
It's quite fun: good exercize for my brain and for my (very little) java skills too!!!
Hey Alessandro is the book out i.e.Head First Android development??
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
Google would know that much faster than anyone here could possibly answer, no?
Alessandro Camel
Ranch Hand
Joined: Jul 03, 2009
Posts: 35
posted
0
zoheb hassan wrote:Hey Alessandro is the book out i.e.Head First Android development??
It's an "early release" that I have bought from O'Reilly in pdf format.
It is not complete and there are different mistakes, but as "Head First Java" I'm enjoying it! ;)
jonathan simon
Greenhorn
Joined: Sep 01, 2011
Posts: 4
posted
0
Alessandro Camel wrote:
I am following "Head First Android delevopment" book and I spent about 10 hours to fix the first "ready bake code"!!
It's quite fun: good exercize for my brain and for my (very little) java skills too!!!
Hi Alessandro.
I'm the author of Head First Android Development and I'm cranking away trying to get the last few chapters finished off. I'm really sorry that the ready baked code from the NASA Image of the day app is broken! Those were some of the first chapters I wrote and I had an inordinate number of copy/paste mistakes that I'm working hard to fix now. If you find issues as you work through the book, it would be great if you could add errata (there is a place for errata on the book page at O'Reilly http://oreilly.com/catalog/0636920012825).
That said, if you (or anyone else) has any suggestions about a better or more generic way to implement the SAX parsing, drop me a line here or at jonathan.s.simon@gmail.com. I'm also in the process of getting the code example apps for book packaged up for distribution which would make your problems a lot less hard to solve. I'm leaning towards github to make it easy for learners to fork the examples, but we'll have to see how O'Reilly wants to distribute the code ;)
I hope you're enjoying the book Alessandro! Love to hear what you think!
Thanks!
Jonathan
Alessandro Camel
Ranch Hand
Joined: Jul 03, 2009
Posts: 35
posted
0
jonathan simon wrote:
Hi Alessandro.
I'm the author of Head First Android Development and I'm cranking away trying to get the last few chapters finished off. I'm really sorry that the ready baked code from the NASA Image of the day app is broken! Those were some of the first chapters I wrote and I had an inordinate number of copy/paste mistakes that I'm working hard to fix now. If you find issues as you work through the book, it would be great if you could add errata (there is a place for errata on the book page at O'Reilly http://oreilly.com/catalog/0636920012825).
That said, if you (or anyone else) has any suggestions about a better or more generic way to implement the SAX parsing, drop me a line here or at jonathan.s.simon@gmail.com. I'm also in the process of getting the code example apps for book packaged up for distribution which would make your problems a lot less hard to solve. I'm leaning towards github to make it easy for learners to fork the examples, but we'll have to see how O'Reilly wants to distribute the code ;)
I hope you're enjoying the book Alessandro! Love to hear what you think!
Thanks!
Jonathan
Thanks Jonathan,
as I said, I really like the book and I am going to send you an email with my impressions and I am going to submit the errata I found on it!
With this I'd like to thank you, pubblicaly, for your work !
I am really enjoying the book, but more than that, it really gave me the possibility to put my hands on android programming without been boring from hundreds of theorical stuff.
(and I mean put my hand on java code, not only XML code as a lot of beginners books are doing).
I feel to say anyone:" hey, this book is great for starting: buy it, but you have to clean your dust for your old java books, and put beside it another "not funny" android book"! ;)
Best regards
Alessandro
jonathan simon
Greenhorn
Joined: Sep 01, 2011
Posts: 4
posted
0
Quick follow-up:
I posted the sample code for the book on GitHub: https://github.com/jonathansimon/HFAD-Code-Samples. Right now, I added the sample code for chapters 1-4. I'm working revisions of chapters 6-8, so I'm holding off up putting that code up there.
I tracked down the issues with the NASA app and it actually looks like in addition to the issues mentioned here, they updated the feed changing the location of the image to be inside a link/enclosure element. It should be all working now.
If you see any other issues, or have suggestions on improving the code, drop me a line. Thanks!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.