dnewcome / jath

Jath is a simple template language for parsing xml using json markup.
MIT License
68 stars 15 forks source link

I am not able to use Jath for the following xml #12

Closed rhka closed 12 years ago

rhka commented 12 years ago
<list>
<item>example1</item>
<item>example2</item>
<item>example3</item>
<item>example4</item>
</list>

When am executing the following scripts, it returns only one value. Anyone can help ?

Jath.parse(["//list",{ name : 'item' }],data);

dnewcome commented 12 years ago

You will need to use collection template syntax over the item tag.

Try something like this.

Jath.parse(["//item",{
   name : '.'
}],data);
rhka commented 12 years ago

Thanks a lot. It's working fine now.