[jdom-interest] use of global variables
Norrman Per
per.norrman at canovia.se
Thu Oct 3 06:24:11 PDT 2002
Entities, perhaps?
<!ENTITY user "some_user" >
<!ENTITY pwd "some_pwd" >
<xxx>
<variable name="&user;" password="&pwd;" />
</xxx>
/pmn
PS. Note that xml is a reserved name. Don't use it for element names. DS.
-----Original Message-----
From: Dennis Rohm [mailto:drohm at triant.com]
Sent: Thursday, October 03, 2002 9:40 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] use of global variables
Hi all, I am a newbie to XML parsing and JDOM and have what should be a
simple question. I am creating a Document object as follows:
Document doc = new SAXBuilder( ).build(instructionFile.xml);
Within instructionFile.xml I wish to define variables - something like:
DEFINE user = some_user
DEFINE pwd = some_pwd
<xml>
<variable name=%user% password=%pwd%></variable>
</xml>
obviously this is not the correct syntax (unless I am really lucky) . Is
there a syntactical way to do this? If not, what is the easiest way to
parse the xml doc and replace
instances of the defined variables with there values? Thanks,
Dennis
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20021003/21c94bea/attachment.htm
More information about the jdom-interest
mailing list