Hi Alexander,
I'm far from an expert in xpath/xquery etc, but I've worked a little
with it. I would recommend starting by taking a look at the
XQueryXPath Sample on the xmlbeans site:
http://xmlbeans.apache.org/samples/XQueryXPath.html .
I've found that useful for clearing up some of my confusion. The other
I usually do is just give my queries a try using XMLBeans. Usually it
something along the lines of:
XmlObject[] x0 =
[SomeType|XmlObject|XmlCursor].execQuery("<some_really_poor_query/>");
for(int i=0; i<x0.length; i++){
System.out.println("["+i+"]"-x0[i].xmlText());
}
And then I figure out if what I got back can be cast to a specific
type and go from there.
SomeType s0 = (SomeType)x0[i];
-or-
SomeType s0 = SomeType.Factory.parse(x0[i].xmlText());
I hope this at least points you in the right direction.
-Jacobd
On 3/13/07, Alexander Schatten <[EMAIL PROTECTED]> wrote:
I apologize for the probably stupid beginner question, but I wonder:
when I use xquery, e.g., like:
for $x in doc("books.xml")/bookstore/book
where ...
return $x/title
the problem is, that the result XML is "far away" from the Schema and
Object hierarchy; how would that work, or do I misunderstand something?!
thanks
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]