This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing a XML file from client-side and server-side  RSS feed

 
Daniel Zuckermann
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to read an XML file with JavaScript on the client-side and on the server-side with help of a servlet. Can I use only one XML file here, if the XML is parsed before the application starts, or is it a better idea to use two xml files?
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite understand the question. But probably that's because I have trouble understanding why you would want to read the XML file anyway. It would be helpful if you explained what you planned to do with the XML file, apart from just reading it.

And I don't understand how you would go about using two XML files anyway. Would they be identical files, or would they be different? Where would they be located? That seems a lot harder than just having one file and having components access it as required.
 
Daniel Zuckermann
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet reads the XML file to display some text and some images. However, some of those images should also be used on the client-side, that's why I want to read the image paths with JavaScript form the same XML file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!