Skip to Content
0
Former Member
Nov 09, 2006 at 11:51 AM

Parse XML in par structure.

35 Views

Hi,

I want to parse an XML file which I want to store in my par project structure. Should I just store it in PORTAL-INF like portalapp.xml?

I tried doing this:

IResource xmlResource = request.getResource(IResource.XML,"PORTAL-INF/test.xml");

String url = xmlResource.getResourceInformation().getURL(request);

File f = new File(url);

FileInputStream fis = new FileInputStream(f);

......docBuilder.parse(fis);

My URL formed is /irj/WEB-INF/portal/portalapps/<project name>/PORTAL-INF/test.xmlhello

And the exception I get is :/irj/WEB-INF/portal/portalapps/<project name>/PORTAL-INF/test.xml (No such file or directory)

Am I doing this correctly?