When you build and run the importNode project, you should get the following output, displayed in three message boxes.
doc1.xml after importing /doc from doc2.xml: <?xml version="1.0"?> <doc> <a class="1">doc1</a> <b class="1">author1</b> <doc> <a class="2">doc 2</a> <b class="2">author 2</b> </doc> </doc> doc1.xml after importing /doc/b from self: <?xml version="1.0"?> <doc> <a class="1">doc1</a> <b class="1">author1</b> <doc> <a class="2">doc 2</a> <b class="2">author 2</b> </doc> <b class="1">author1</b> </doc> doc1.xml after cloning /doc/a from self: <?xml version="1.0"?> <doc> <a class="1">doc1</a> <b class="1">author1</b> <doc> <a class="2">doc 2</a> <b class="2">author 2</b> </doc> <b class="1">author1</b> <a class="1">doc1</a> </doc> a new document was saved to out.xml in the current working directory.