Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Java > reading .xml fi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 67 of 81
Post > Topic >>

reading .xml files through InputStream

by "i_lk" <afia_zafar82@[EMAIL PROTECTED] > Oct 11, 2005 at 03:01 PM

hi
i m using JBuilderX... the problem i m facing is very childish yet i
could'nt find the sol...i m retrieving the contents of an xml file
using

 InputStream is = another_class.getResourceInputStream("log4j.XML");

another_class:-

protected static InputStream getResourceInputStream(String xml_file)
      throws IOException {
    System.out.println(xml_file) ;
      ClassLoader cl = ResourceManager.class.getClassLoader();
      return cl.getResourceAsStream(xml_file);
      }
 the code is fine but it cant get the xyz.xml file..and it returns
NULL.
i have used every option... i want to keep the file in a separate
directory in project files say  dir1 .... what should i give in the
path... how can i get the path of that file as a pert of my
program...?
thanks a lot
 




 1 Posts in Topic:
reading .xml files through InputStream
"i_lk" <afia  2005-10-11 15:01:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 23 23:42:50 CDT 2008.