views:

8

answers:

1

Hi, I have a XML document which looks something like this:

<events>
    <event category="gymnastics" subcategory="rhythmic" date="5" venue="ig stadium">
        <id>1</id>
    </event>
    <event category="gymnastics" subcategory="test" date="6" venue="jn stadium">
        <id>2</id>
    </event>
    <event category="athletics" subcategory="sprint" date="5" venue="ig stadium">
        <id>3</id>
    </event>
    <event category="athletics" subcategory="marathon" date="6" venue="jn stadium">
        <id>4</id>
    </event>
    <event category="swimming" subcategory="freestyle" date="7" venue="ig stadium">
        <id>5</id>
    </event>
</events>

So now when I issue a XPath query to MiniXPath like this in order to get nodes with category=gymnastics and subcategory=rhythmic: //events/event[@category="gymnastics" and @subcategory="rhythmic"]

,the program crashes and fails to give any output. Is the path syntax right? Is MiniXPath feature complete? Is there any other XPath library that I can use on a mobile in a J2ME environment.

A: 

From http://minixpath.sourceforge.net/

Features - supports child::, descendant::, attribute::, parent:: as axes; - supports *, node(), text() as node tests - good support for namespaces - supports simple expressions as predicates (i.e. [@city=rome])

Also, from source it looks like it doesn't handle logical operators.

Alejandro
yeah. looks like i will spend some time working the feature in it, and might as well add to the project. thanks again.
kumar