Some samples...

Looking for an attribute...

    xpath = "//*/[EMAIL PROTECTED]'someText']";

Looking for an attribute from the root:

    xpath = "/[EMAIL PROTECTED]'someText']";

Looking for a Tag:

    xpath = "//*/myTag[text()='myTagText']";


XPath Tutorial:

 http://www.zvon.org/xxl/XPathTutorial/General/examples.html


Mark

"Mark J. Stang" wrote:

> I have a java client that does xpath queries.   It queries on both
> attributes and tags.   I have tested most of the xpath searches as
> part of my application, so it does work.   Typically, your query isn't
> correct ;-).   What does your document look like and your
> query?
>
> Mark
>
> "Mag. Josef Fritsch" wrote:
>
> > Hey Mark,
> > thank you very much for answering. I know the problems with the windows
> > command-line. I tested my xpath-Expressions with java-xsp under cocoon2 and
> > i suspect this is a bug in xindice. It would be very interesting for me if
> > anyone has tested similiar expressions with a java client.
> > Best Regards
> > Joe
> >
> > At 09:32 13.03.2002 -0700, you wrote:
> > >The best solution for windows is to put it in double quotes.   If you
> > >send me your entire command-line, I can tell you where to put the
> > >quotes.  The problem is that windows is parsing your query rather
> > >than passing it into xindice.   So if you put quotes around it, then
> > >windows will pass it in untouched.
> > >
> > >Mark
> > >
> > >Jan Metzner wrote:
> > >
> > > > > I have installed xml-xindice-1.0rc2 on Win2000. Everything works fine,
> > > > > only xpath - Expressions like:
> > > > > //[EMAIL PROTECTED]'Sprenger']  or
> > > > I don't use windows, but it is possible that you have to escape the
> > > > query if you use the command line client: //[EMAIL 
> > > > PROTECTED]'Sprenger\']
> > > > > //[EMAIL PROTECTED]
> > > > this should work.
> > > >
> > > > Jan

Reply via email to