> Thanks Remy,
>  For DAV:resourcetype
>  Another question:
> After using propFindMethod.getResponseProperties(url), For the property
> resourcetype, The getPropertyAsString() method gives "" even for
collection
> resource type.
> the reply xml fragment is :
> <D:resourcetype xmlns:D="DAV:"><collection></collection></D:resourcetype>
>
>  Could we find a way to distinguish collection and noncollection based on
> using propFindMethod?

Yes.
getPropertyAsString will return the text content of the property node
(according to the DOM definition of text). Here, the resourcetype node has
no child text node, so getPropertyAsString() returns "".
You can do either :
- call getElement() which will return the property node, and parse the
children.
- cast your resourcetype Property object to
lib.properties.ResourceTypeProperty and call isCollection(). Note that the
collection child node *must* be in the "DAV:" namespace for the call to
return true.

Remy

Reply via email to