Hi,
I have an xml file with properties:
<?xml version="1.0" encoding="UTF-8"?>
<plugins>
<plugin>
<featureid>org.eclipse.platform</featureid>
<version>3.0.0</version>
<actiontype>install</actiontype>
<description></description>
<url>http://update.eclipse.org/updates/3.0</url>
</plugin>
<plugin>
<featureid>org.eclipse.check</featureid>
<version>3.1.0</version>
<actiontype>update</actiontype>
<description></description>
<url>http://update.eclipse.org/updates/3.1</url>
</plugin>
</plugins>
Plugin class
------------
ublic class Plugin {
private String featureId = null;
public Plugin(String featureId, String version, String actionType,
String description, String url){
}
//Then apply get and set methods.
}
I need to read this file and create plugin objects containing this
information. Any hints on how I can do this easily?
cheers,
//mikael
Bart Cremers - 25 Oct 2006 15:27 GMT
> Hi,
>
[quoted text clipped - 6 lines]
>
> //mikael
Use a SAX parser to read the xml file.
Store the tag data in fields in the handler by correctly writing the
startTag handling code. On the endTag for a Plugin tag you can create
instances of the Plugin class using the collected data.
Regards,
Bart
Petterson Mikael - 26 Oct 2006 09:20 GMT
>>Hi,
>>
[quoted text clipped - 16 lines]
>
> Bart
Thanks for a the hints.
cheers,
//mikael