This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes GWT and the fly likes Can't read an XML file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Can Watch "Can New topic
Author

Can't read an XML file.

Laurence Turpin
Greenhorn

Joined: May 21, 2012
Posts: 19
Hello,

I'm using GWT 2.4 on Windows 7
I'm trying to learn how to read in an xml file from the tutorial at DevGuideXML
It gives instruction on how to get the information from xml that is in a string.
Unfortunately it does not give any information about how to get the xml file into a string.
I found the answer to the following query at stackflow helpful Stackflow
I'm not sure where I should put the xml file in my project.
If I put the xml file in clients package or the server package I get a warning.
The warning occurs when I run the program, it says that it has not found the xml file.
If I put the xml file in the war package the warning stops but the file still does seem to be getting read

Where should I put the xml file?

Here is the contents of the xml file:



Here is my java code to read the xml file:



What I need to know is which package I put the xml file?
Is this code correct?
Laurence Turpin
Greenhorn

Joined: May 21, 2012
Posts: 19
Hi,

I resolved my problem.
I found that I had imported the wrong namespace.
I changed the imports for both Text and Element and my program worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't read an XML file.
 
Similar Threads
Sending HTTP Request in GWT
GWT fileuploading error
GWT Where is the uploaded String saved?
Empty browser with GWT Development mode
Need help on implementing a ClickHandler in a GWT composite widget