[jdom-interest] Using variables in XML files

Isaac Sparrow isaac.sparrow at visicomp.com
Wed May 15 10:28:30 PDT 2002


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

On Wednesday 15 May 2002 06:20 am, Laurent Bihanic wrote:
> Isaac Sparrow wrote:
> > One solution would be to find and replace these variables while the XML
> > file is being parsed (although I don't know how).
>
> You could use a SAX filter (see org.xml.sax.XMLFilter interface) to scan
> attribute values in startElement(), recognize the "${...}" pattern (maybe
> using regexp), evaluate the expression and replace it by the variable
> value. Of course this assumes you are using SAXBuilder to create the JDOM
> documents.
>
> The samples/sax directory of the JDOM distribution contains examples of SAX
> filter.
>
> Laurent
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourho
>st.com

Perfect. This is exactly what I was hoping for. 

Thanks again,
- -- 

- -------------------------------------------------------------------
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 think your opinions are reasonable, except for the one about my mental
instability.
		-- Psychology Professor, Farifield University

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

iD8DBQE84prBe3nv4WOXT0cRAgo2AJ9C2ROT1kfC7UsxiwN/HSpGh6tSSwCeLVcC
eRSLaiWHaFlogw+ZJROQMEA=
=HLZB
-----END PGP SIGNATURE-----




More information about the jdom-interest mailing list