Hi ,

I tried the delete method shown in the guide.

however I am getting an XML DB exception while deleting.

is there any other manner of deleting?

I have attched my code below:

Rupali

my code:-
--------------

Collection col =
DatabaseManager.getCollection("xmldb:xindice://localhost:8080/db/GlueGeneralTop/ComputingElement/Policy");
        XPathQueryService service =
            (XPathQueryService) col.getService("XPathQueryService",
"1.0");
        ResourceSet resultSet = service.query("//[EMAIL PROTECTED] =
1000]");

        System.out.println(myThread.getName() + " QueryXindice Returning "
+ resultSet.getSize() + " results");

        results = resultSet.getIterator();

        while (results.hasMoreResources())
            {
                resource =  results.nextResource();
                System.out.println((String)resource.getContent());
                col.removeResource(resource);
            }
    } catch (XMLDBException e)
        {
            System.err.println("XML:DB Exception occured " + e.errorCode);
        }


The Error:-
---------

XML:DB Exception occured 1



On Mon, 4 Aug 2003, Julian wrote:

> Rupali,
>
> Visit
> http://xml.apache.org/xindice/guide-developer.html#N101E0
> and scroll down a bit to the heading:
> "Deleting an XML Document from the Database"
>
> HTH,
> Julian
>
> --- Rupali Parab <[EMAIL PROTECTED]> wrote:
> > CAn anyone help me as how to dlete a document in a
> > java program using
> > xpath and xml DB.
> >
> > Thanx a lot,
> > Rupali
>
>
> =====
> Live simply so others may simply live.
>  
> -Ghandi
>  
> Pluralitas non est ponenda sine neccesitate.
> "Entities should not be multiplied unneccesarily"
>  
> -William of Occam
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>

Reply via email to