4 import java
.io
.IOException
;
6 public class ReadData
extends Base
{
10 public static void main(String
[] args
) throws IOException
, RepositoryException
{
11 ReadData readdata
= new ReadData();
15 private void run() throws IOException
, RepositoryException
{
16 Repository repository
= getRepository();
18 Session session
= getSession(repository
);
20 Node rootnode
= session
.getRootNode();
22 Node childnode
= null;
24 childnode
= rootnode
.getNode("foo");
26 Property prop
= childnode
.getProperty("bar");
27 System
.out
.println("value of /foo@bar: " + prop
.getString());
28 } catch (PathNotFoundException pnfe
) {
29 System
.out
.println("/foo@bar not found.");
31 } catch (PathNotFoundException pnfe
) {
32 System
.out
.println("/foo not found.");