• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Reading values from xml file

 
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need to read values from a xml file...and populate them to a dialogbox.But I dont ahve an idea as to how to do it.

My xml file..is like this..
<root>
<parameter>
<node>servename</node>
<name>....</name>
</parameter>
<parameter>
<node>timeout</node>
<value>....</value>
</parameter>
and some more parameters...
</root>

Waht i need is based on the selected function i need to read values of the function specific paramter ...(the embedded values) and poulate them into a dialogbox.

I am using spring framework and swings..

Looking forward to an answer.

Thanks in advance,
Agatha.
 
Gold Digger
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this thread to the XML forum. Please continue this discussion there. Thank you
 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Agatha Christie:
Hi all,

I need to read values from a xml file...and populate them to a dialogbox.But I dont ahve an idea as to how to do it.

My xml file..is like this..
<root>
<parameter>
<node>servename</node>
<name>....</name>
</parameter>
<parameter>
<node>timeout</node>
<value>....</value>
</parameter>
and some more parameters...
</root>

Waht i need is based on the selected function i need to read values of the function specific paramter ...(the embedded values) and poulate them into a dialogbox.

I am using spring framework and swings..

Looking forward to an answer.

Thanks in advance,
Agatha.



Agatha,

You are really good writer. I like ur books.

Regarding ur question, there are different open source projects to help ur cause. As a example you can use xstream. That is for simple processing.

If u have to comply with a XSD, you may want to look at castor.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Agatha",

Please change your display name to something compliant with our naming policy (obviously fake names are not allowed).

Thanks, and welcome to the ranch!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!