08-25-2011 12:01 PM
hi i want parse a xml whic is on the web..i hv try many code but it doesnot work....
but local parsing works!!!
and pls also tell me that if a tag have image url or video url how can i fatch that image and video!!!!
pls help me as soon s possible !!!!
08-25-2011 12:31 PM
Welcome to the forums.
It is possible to process XML feeds from the Internet, you just need to open a connection to them.
Look at httpDemo as an example of how you can get XML data (in httpDemo case, change the URL and you could get XML data) on the phone for parsing.
Normally with XML, the tag will identify the URL for an image, and you will have to download it, again httpDemo will help you download the bytes, then you will need to convert the bytes to an image.
Questions like this are asked quite frequently on this forum, I recommend that do a search and look for more information and alternative answers.
08-26-2011 03:24 AM
ve this url : http://www.androidpeople.com/wp-content/uploads/20
can any body send parsing code for fatching name tag ...
pls send code according to this url;
08-26-2011 04:52 AM
If you pay me enough I will write the rest of your application too! ![]()
Seriously, I think the point of this forum is help fellow developers write their own code, not write the code for them.
I've already pointed you at code to download the XML from a URL. You can use this KB article to learn how to parse the XML.
http://supportforums.blackberry.com/t5/Java-Develo
You should have enough to get started writing your own code.
Good luck.
08-26-2011 05:11 AM
ok thakns can u pls send me test.xml also!!!!![]()
08-26-2011 05:15 AM
i tried your code but it gives this warning
Warning!: Invocation of questionable method: java.lang.String.<init>() found in: mypackage.MyScreen$Connection.run()
08-26-2011 05:31 AM
"can u pls send me test.xml also" What are you asking for here?
"i tried your code ..." I don't think there is any of my code in any of the links I have given you.
That said, I would not worry about that warning.
08-26-2011 05:34 AM
m just asking for xml file which is using in your eample
named as test.xml
08-26-2011 06:41 AM
Ah I see. You know I haven't looked at the sample in a while and it seems they have changed it (or my memory has gone) and previously it used a local XML file. I haven't even realised it did network I/O!
You should replace the URL:
http://localhost:8000/content/test.xml
with your own URL
08-27-2011 12:58 AM
hi....
any body know that how to access video and image which is define in xml tag as url....