BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 02-04-2005, 06:52 AM   #1
phobeous
Knows Where the Search Button Is
 
Join Date: Jan 2005
Location: Spain
Model: 7230
Carrier: Movistar
Posts: 19
Default Get XML InputStream from .cod file

Please Login to Remove!

Hi everyone, I'm developing an application in which I've to read a xml file (it describes a tree-menu). For that issue I just added the xml file to the project and parsed it with Kxml, using .getResourceAsStream(...) inside my custom parser method. Everything works fine if I use no packages (usually when I'm testing). When I decided to use packages, I moved the xml file to the same directory as my parser class and the file just can't be read.

This has sense because the intermediate .jar file doesn't associate the path to resources files (such as images and my xml file).

The first solution is go backward and refuse packages but I want to use packages, so the answer is: does anyone got the same problem as me? If so: how did you solve?. Maybe this could be done with access to the contents of the cod file. Is this last possible?

Thanks in advance for any feedback.

Greetz from Spain!!

P.S.: Sorry for my English.
Offline  
Old 02-04-2005, 07:51 AM   #2
phobeous
Knows Where the Search Button Is
 
Join Date: Jan 2005
Location: Spain
Model: 7230
Carrier: Movistar
Posts: 19
Default Auto-answer

Just added the full-qualified name of the class:

Code:
parser.setInputxxx40;new InputStreamReaderxxx40;Class.forNamexxx40;"com.company.ClassName"xxx41;.getResourceAsStreamxxx40;"/file.xml"xxx41;xxx41;xxx41;;
Really works.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


2PC Camshaft Timing Solenoid Valve For 04-10 Ford F-150 Expedition 4.6L 5.4L VCT picture

2PC Camshaft Timing Solenoid Valve For 04-10 Ford F-150 Expedition 4.6L 5.4L VCT

$47.59



SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper picture

SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper

$29.99



Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid picture

Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid

$29.85



Fuel Shut Off Solenoid Fit For Kubota D905 D1005 D1105 17208-60010 17208-60015 picture

Fuel Shut Off Solenoid Fit For Kubota D905 D1005 D1105 17208-60010 17208-60015

$25.25



S.36121 Starter Solenoid Fits John Deere picture

S.36121 Starter Solenoid Fits John Deere

$39.39



120-106762 Starter Solenoid Relay For EZGO TXT Gas Golf Carts 4-Cycle 1994-Up picture

120-106762 Starter Solenoid Relay For EZGO TXT Gas Golf Carts 4-Cycle 1994-Up

$19.49







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.