Apache Digester parse xml with ${var} to get environment var

L

lewindletter

Hi

I want to use digester to parse an xml, then use it as a key to us
System.getPropety to retrive the actual value
Can it be done?

eg
<jdbc>
<ip="${DEV_DBSERVER_IP"/>
</jdbc>

where DEV_DBSERVER_IP is set as enviroment variable

Thanks
 
S

skyofdreams

Hi

I want to use digester to parse an xml, then use it as a key to us
System.getPropety to retrive the actual value
Can it be done?

eg
<jdbc>
<ip="${DEV_DBSERVER_IP"/>
</jdbc>

where DEV_DBSERVER_IP is set as enviroment variable

Thanks

Several months ago, we encounted the same requirement ,too.
I remember we finally replace the "${DEV_DBSERVER_IP}"-like string by
our self code.
i.e read file into buffer, replace specified string, then after all
done, to parser it.

It should be folly method.
expect good manner to solve this.

-skyofdreams
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top