Skip to Content
avatar image
Former Member

How use XML-Parser in Web Dypro (how get filename)

Hi everybody,

i want to use the saxparser to read a xml-file via a Fileupload-UI element. In Web Dynpro it is not possible to get the path of a file which was on a client through the Fileupload-UI. So how can i use a xml-parser when i have to give it the file name?

Is it possible to use the "resource" of the Fileupload-UI instead ot the filename? How can i call the parser?


                    SAXParser saxParser= null;
		
	try{    			
		SAXParserFactory factory = SAXParserFactory.newInstance();			
		saxParser = factory.newSAXParser();			
		saxParser.parse( new File(??????), new  Gaeb());

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

regards,

Sid

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 01, 2009 at 10:42 AM

    Why do you need the path on the client after uploading? After uploading the file to the server, you can get its URL via IWDResource.getUrl() and you have a read() method for accessing the resource.

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 01, 2009 at 11:54 AM
    Add comment
    10|10000 characters needed characters exceeded