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

Node type check #1

Open
AndreaInglese opened this issue Aug 14, 2009 · 1 comment
Open

Node type check #1

AndreaInglese opened this issue Aug 14, 2009 · 1 comment

Comments

@AndreaInglese
Copy link

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..

@aslakhellesoy
Copy link
Owner

Hi Andrea,

Feel free to fork this project and change the code. If you send me a pull request I'll merge it in.

Thanks,
Aslak

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants