Reading collections in an embedded instance

View: New views
2 Messages — Rating Filter:   Alert me  

Reading collections in an embedded instance

by karanjit cheema :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to read xml files through a java application.
After creating an instance of the database, i am doing
DatabaseManager.getCollection(xmldb:exist///db/shakespeare/plays,"admin"," ");
this doesnt seem to work as it returns a null collection.
where do i have to place the xml files and what should i pass as the
paramete to the getCollection method??


Regards,
Karanjit Cheema

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Reading collections in an embedded instance

by Dannes Wessels-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, Nov 2, 2009 at 8:35 AM, karanjit cheema <karanjitcheema@...> wrote:
I am trying to read xml files through a java application.
After creating an instance of the database, i am doing
DatabaseManager.getCollection(xmldb:exist///db/shakespeare/plays,"admin"," ");
this doesnt seem to work as it returns a null collection.
where do i have to place the xml files and what should i pass as the
paramete to the getCollection method??
 
Since you attempt to use our example data set, you need to put the files in /db/shakespeare/plays ......
The method probably returns 'null' if you attempt to access a non existing collection.

regards

Dannes



--
eXist-db Native XML Database - http://exist-db.org
Join us on linked-in: http://www.linkedin.com/groups?gid=35624

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open