Can Resource.getContent() return a Map object directly?

"Alex Chew" <[email protected]> Mon, 19 Jun 2006 11:13:33 +0800
Newsgroups gmane.text.xml.xindice.user
Message-ID <[email protected]>
Hi, everybody

             In my project, I want to use a query result just like
java.util.Map. But Resource.getContent() just return a raw XML String. Does
there some method can convert a query result into a Map object? Then i can
use like this,

I tried now,
 while (resourceIterator.hasMoreResources()) {
                Resource resource = resourceIterator.nextResource();
//I must extract each value, element and attribute, here. It looks some
stranges and runs slowly
                System.out.println((String) resource.getContent());
           }

I want it can work like this,
  while (resourceIterator.hasMoreResources()) {
                Resource resource = resourceIterator.nextResource();
Map result = resource.getMap();
//then i can get specified value just use result.get("key")
           }

thanks.
alex