Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read xml file

Status
Not open for further replies.

myFortress3

Programmer
Dec 8, 2009
1
US
I am new to ant and currently I am trying to read a value from an xml file that stores the build information for mulltiple projects. I am trying to get the build date for project "B" and store that value in a variable. As simple as it may seem I cannot access the value using property tag along with xmlproerty. I need to indicate to ANT that it needs to read the second BuildInfo node but I don't know how to do so.

<xmlproperty file="${ServerConfigFolder}\${FileName}" semanticAttributes="true" collapseAttributes="true"/>
<property name="lastBuildDate" value="${onRequestStart.configuration.buildInfo.buildDate}" />


Please help, it is driving me crazy. The format of the xml file is as follows.

<onRequestStart xmlns=" id="application_wynch">
<configuration>
<buildInfo Project="A">
<build>21</build>
<buildDate>20091203</buildDate>
<version>1</version>
</buildInfo>
<buildInfo Project="B">
<build>278</build>
<buildDate>20091208</buildDate>
<version>1</version>
</buildInfo>
<buildInfo Project="C">
<build>2</build>
<buildDate>20091027</buildDate>
<version>1</version>
</buildInfo>
</configuration>
</onRequestStart>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top