Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2009-02-13T16:44:47Z by mburati
mburati
mburati
2 Posts
ACCEPTED ANSWER

Pinned topic Test Thread - Please Ignore

‏2009-02-13T16:43:36Z |
Testing how to post code fragments, since others are having problems doing so...


FileInputStream fis = 

null; Reader reader = 

null; 

try 
{ fis = 

new FileInputStream(file); reader = 

new InputStreamReader(fis, ENCODING); IXml top = XmlUtil.parseXml(reader); 
// Do something interesting with top, like save into a variable.<br/> 
} 

catch (Exception ex) 
{ ex.printStackTrace(); 
}


Wrapped above in curly code curly to see whether the forum plain text help is useful or incorrect...
Updated on 2009-02-13T16:44:47Z at 2009-02-13T16:44:47Z by mburati
  • mburati
    mburati
    2 Posts
    ACCEPTED ANSWER

    Re: Test Thread - Please Ignore

    ‏2009-02-13T16:44:47Z  in response to mburati
    Nope, that didn't work - how about this?

     FileInputStream fis = null;
    Reader reader = null;
    try
    {
    fis = new FileInputStream(file);
    reader = new InputStreamReader(fis, ENCODING);
    IXml top = XmlUtil.parseXml(reader);
    // Do something interesting with top, like save into a variable.
    }
    catch (Exception ex)
    {
    ex.printStackTrace();
    }

    Wrapped the above with the html pre tag.