Dear list,

I'm evaluating the restlet framework to see if we can use it to create clients for our restful image server.

It's been a while since I was actively coding in java and it took a while to get an xcode project (I'm on osx 10.4.10) into a shape to get the book examples to compile and run.

Now I've worked that out up to a point that eg. example 2_1a compiles but generates a runtime error:
   [Fatal Error] :1:1: Content is not allowed in prolog.

It dies in the loop to iterate over the requested items in the document.
           // Use XPath to find the interesting parts of the data structure
           String expr = "/ResultSet/Result/Title";
           for (Node node : document.getNodes(expr)) {
               System.out.println(node.getTextContent());
           }

Any clues what is going wrong?

Thanks in advance,
--Aadjan

Run log:
[Session started at 2007-09-27 22:08:45 +0200.]
Sep 27, 2007 10:08:47 PM com.noelios.restlet.http.StreamClientHelper start
INFO: Starting the HTTP client
[Fatal Error] :1:1: Content is not allowed in prolog.
Exception in thread "main" java.lang.NullPointerException
   at Example2_1a.main(Example2_1a.java:46)

java has exited with status 1.

Reply via email to