Reputation: 337
I downloaded the Google Calendar API for java and am very confused about the contents of the xml files. I`m pretty new to java. What resources should I be looking for to understand how to manipulate the content of these xml files? Here's an example of the contents:
<!-- samples build Properties -->
<property name="sample.calendar.basedir"
value="${build}/sample/calendar"/>
<property name="sample.calendar.src.home"
value="${sample.calendar.basedir}"/>
Specifically, I'm trying to figure out what the '$' does and what are the contents between curly braces.
Upvotes: 0
Views: 105
Reputation: 163262
The XML file in question appears to be an Ant build file.
If you need to understand it, you will need to read about Ant. It's a tool for building software, and you can find information by googling for "apache ant".
But perhaps you don't need to understand it; perhaps you only need to run it. Perhaps you don't even need to do that. You haven't said anything about what you are trying to achieve, so it's hard to tell.
Upvotes: 0
Reputation: 12123
Edit: If you're really desperate, use grep.
$ cd /path/to/base/dir/
$ find . -type f | xargs grep "ant.file.calendar"
Then you can see all the places where it's used, and find where it's defined.
The ${} syntax refers to variables that are defined (a) in .properties
files (b) between <properties>
or <property>
XML tags or (c) by other means, such as environment variables or runtime behavior.
To give you an example,
<?xml>
<project>
<properties>
<jetty.port>8080</jetty.port>
</properties>
<build>
...
<port>${jetty.port}</port>
</build>
</project>
You might encounter the above in the pom.xml file for a Jetty webapp. You see how the ${jetty.port}
property is defined between the <properties>
tags. This is one way to define it.
In your case, the ${build}
variable is defined somewhere, but it's impossible to say without looking at your directory. It may even be defined in the same XML file where you see it.
Upvotes: 2