<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Meddelande</TITLE>
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2719.2200" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK
href="cid:filelist.xml@01C26A75.7683EB30" rel=File-List><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P.MsoAutoSig {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoAutoSig {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoAutoSig {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
        mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
        mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=purple link=blue>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2>Entities, perhaps?</FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2><!ENTITY user "some_user" ></FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2><!ENTITY pwd "some_pwd" ></FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2><xxx></FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002> <FONT face=Arial
color=#0000ff size=2><variable name="&user;" password="&pwd;"
/></FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2></xxx></FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2>/pmn</FONT></SPAN></DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=877070713-03102002><FONT face=Arial color=#0000ff size=2>PS.
Note that xml is a reserved name. Don't use it for element names.
DS.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=sv dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Dennis Rohm
[mailto:drohm@triant.com] <BR><B>Sent:</B> Thursday, October 03, 2002 9:40
AM<BR><B>To:</B> jdom-interest@jdom.org<BR><B>Subject:</B> [jdom-interest] use
of global variables<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Hi all, I am a newbie to XML parsing and JDOM and have
what should be a simple question.<SPAN style="mso-spacerun: yes">
</SPAN>I am creating a Document object as
follows:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Document doc = new <SPAN class=SpellE><SPAN
class=GramE>SAXBuilder</SPAN></SPAN><SPAN class=GramE>(</SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>).build(<SPAN
class=SpellE>instructionFile.xml</SPAN>);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Within <SPAN class=SpellE>instructionFile.xml</SPAN> I
wish to define variables - something like:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">DEFINE user = <SPAN
class=SpellE>some_user</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">DEFINE <SPAN class=SpellE>pwd</SPAN> = <SPAN
class=SpellE>some_pwd</SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><<SPAN
class=GramE>xml</SPAN>><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><SPAN
style="mso-tab-count: 1">
</SPAN><variable name=%user% password=%<SPAN class=SpellE><SPAN
class=GramE>pwd</SPAN></SPAN><SPAN
class=GramE>%</SPAN>></variable><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"></xml><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=GramE><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">obviously</SPAN></FONT></SPAN> this is not the correct
syntax (unless I am really lucky) .<SPAN style="mso-spacerun: yes">
</SPAN>Is there a syntactical way to do this?<SPAN
style="mso-spacerun: yes"> </SPAN>If not, what is the easiest way to
parse the xml doc and replace<o:p></o:p></P>
<P class=MsoNormal><SPAN class=GramE><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">instances</SPAN></FONT></SPAN> of the defined
variables with there values? <SPAN
style="mso-spacerun: yes"> </SPAN>Thanks,<o:p></o:p></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Dennis<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>
<P><FONT SIZE=2 FACE="Arial">###########################################<BR>
<BR>
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.<BR>
For more information, connect to http://www.F-Secure.com/</FONT></P>