[jdom-interest] Using variables in XML files

Isaac Sparrow isaac.sparrow at visicomp.com
Wed May 15 00:52:58 PDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I would like to use variables in my XML files. For instance take the "value" 
attribute in the following element:

<foo name="projDir" value="${user.home}" />

My question is what is the best way to replace these "variables" and when? 

One solution would be to find and replace these variables while the XML file 
is being parsed (although I don't know how). 

Does anyone have any ideas on how to use variables in an XML file while 
keeping their use hidden from other code in a application?

Thanks,
- -- 

- -------------------------------------------------------------------
Isaac Sparrow
Staff Engineer
VisiComp, Inc.
http://www.visicomp.com

GnuPG Key Fingerprint:
1060 5A07 F6EC B2B3 9AAA 3EA5 7B79 EFE1 6397 4F47
Get my public key at:
http://www.concentric.net/~issparow

I'm N-ary the tree, I am,
N-ary the tree, I am, I am.
I'm getting traversed by the parser next door,
She's traversed me seven times before.
And ev'ry time it was an N-ary (N-ary!)
Never wouldn't ever do a binary. (No sir!)
I'm 'er eighth tree that was N-ary.
N-ary the tree I am, I am,
N-ary the tree I am.
		-- Stolen from Paul Revere and the Raiders

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: NSA bad. Encryption good.

iD8DBQE84hPne3nv4WOXT0cRAuvnAKCo9r9eGs4+WOw2KoUn30dCIXAz9ACdGvuL
POru9KDYn81y1AtstCA9QGM=
=2Dv9
-----END PGP SIGNATURE-----




More information about the jdom-interest mailing list