Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Node type check #1

Description

@AndreaInglese

Hi Aslak, i tried your sample client with a webdav server that i've written. It's working well but since my server adds extra empty spaces (space, tabulation or new lines, for debug) between xml response elemets, in firefox the statement:

 for (var i = 1; i < doc.childNodes.length; i++) {
                var response = doc.childNodes[i];

sets the response var to a text node, generating a "response.getElementsByTagName is not a function" error on the following line.

To fix this, i added a check to the tagName of response, and now it's fine.

for (var i = 1; i < doc.childNodes.length; i++) {
var response = doc.childNodes[i];
if (response.tagName == 'D:response') {// ANDREA --text node
     var href = respon.....
     .....
}

Not sure if this is due to my implementation since it works perfectly with other clients.
Hope this help..

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions