Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] help basic parsing

Jack

2007-02-21

Replies:

hello,
i'm trying to use jdom with the following xml file.
i had like to change the port number (here 1099).
how can i retrieve the text value of the attribute port ?
i have used 3 iteration loop  but i'm sure there's less complicated.
thanks.

<attributes xmlns="http://geronimo.apache.org/xml/ns/attributes-1.1">
  <module name="geronimo/rmi-naming/1.1.1/car">
     <gbean name="RMIRegistry">
        <attribute name="port">1099</attribute>
     </gbean>
     <gbean name="NamingProperties">
        <attribute name="namingProviderUrl">rmi://0.0.0.0:1099</attribute>
     </gbean>
     <gbean name="DownloadedPluginRepos">
        <attribute name="repositoryList">http://download.boulder.ibm.com/ibmdl/pub/software/websphere/wasce/plugins-1.1.1/default-repositories.txt</attribute>
        <attribute name="userRepositories">[]</attribute>
     </gbean>
  </module>
</attributes>


Have a burning question? Go to Yahoo! Answers and get answers from real people who know.
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.