Trying to navigate through an XmlObject using a cursor I've come up with the
following code:
1) XmlObject xyzDocument = XmlObject.Factory.parse(new File("c:/xyz.xml"));
2) System.out.println(xyzDocument);
3) XmlCursor cursor = xyzDocument.newCursor();
4) if(cursor.toFirstChild()) {
5) System.out.println(cursor.getObject());
6) while(cursor.toNextSibling()) {
7) System.out.println(cursor.getObject());
8) }
9) }
10) cursor.dispose();
11) } catch (Exception e) {
12) e.printStackTrace();
13) }
The problem is that after I call the 'toFirstChild' in line 4 I get an
element with the name: <xml-fragment ... when I print it on line 5.
What would be the right way to navigate through an un-typed xml object?