This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read properties file in xml

 
Supri dharshni
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have to read some values from .properties file in xml.Please let me know how to do this.I have read directly not through java.

Thanks.


Regards,
Priya.
 
Paul Clapham
Sheriff
Pie
Posts: 20758
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "in XML"? XML is data, not a programming language, so it can't read a file. You would have to use whatever programming language you are using to process the XML to read the properties file.

And since it's a properties file, the best choice of language to read it would be Java.
 
Supri dharshni
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I meant i need some values from properties file in a xml file.

<a:query>

(xs:QName("empid"),"123")
</a:query>
now,instead of hardcoding 123 i need this to be from properties file.
We have to do this onloading of the xml file.

Thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like a use case for a templating library such as Apache Velocity or FreeMarker.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic