Before you can run the sample, you must first import the sample into
your workspace and launch the test runtime.
- To import the sample:
- Select File > Import.
- From the Import Wizard, select General and then select Existing
Projects into Workspace. Click Next.
- Select the Archive file radio button.
- Enter the name of the sample jar file, xmlparser.jar,
or browse to the com.ibm.rcp.tools.samplegallery plug-in
directory and select the jar file from the archive directory.
- The dialog shows the projects present in the archive jar file.
Select Finish to install the projects into your workspace.
- To launch the test runtime:
- Select Run > Run from the main menu.
- Select Client Services and click New.
- Type a unique name for your configuration, such as XML
Parser.
- Select the Plug-ins tab and verify that the com.ibm.rcp.samples.xmlparser plug-in
is selected.
- Select the Arguments tab and verify that –console is
in the Program Arguments field.
- Click Apply and then Run.
- To start the sample, enter start com.ibm.rcp.samples.xmlparser in
the Console view.
Note: To stop the sample, enter stop com.ibm.rcp.samples.xmlparser.
Output is similar to the following:
osgi> start com.ibm.rcp.samples.xmlparser
osgi> ***Begin Document***
[bookshelf]
[TechnologyBooks]
[Book]
[Name]
JAVA 2 Programming
[/Name]
[Price]
$30.99
[/Price]
[TotalPages]
325
[/TotalPages]
[/Book]
[Book]
[Name]
J2EE Design and Development
[/Name]
[Price]
$52.49
[/Price]
[TotalPages]
583
[/TotalPages]
[/Book]
[/TechnologyBooks]
[/bookshelf]
***End Document***