-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node type undefined comparison is not implemented #34
Comments
What is the other file you are compare against? |
It's basically the same file, as I'm just starting to test this tool |
@lsotov I've created a two files like the one above and used cli version of dom-compare to compare them - no errors. Can you please show the code and attach a test files? |
Hey @Olegas , I am getting the same error, here is my snippet code in javascript:
And here is my xml_file_2.xml:
And here is my xml_file_1.xml:
What I am doing wrong? Thanks! Here is the error in console:
|
After using the following of importing the xml files started working: dom1 = domparser.parseFromString(fs.readFileSync("expected.xml", 'utf-8'), "text/xml"); Thanks anyway! |
Although it doesn't return all the differences :/ For the following examples: actual.xml
expected.xml
It returns only the following differences:
I was expecting address and anotherelement as well to be included on the differences :/ |
@tiagorvmartins Regarding first issue with undefined node type - it is required to parse document from string somehow. It is incorrect to compare strings. Library is designed to compare documents. Anyway, it must be handled correctly, so, I'll add some error checking here. |
@tiagorvmartins for the second case please see #36 |
Fixed and published as 0.3.3 |
Hi,
I'm getting the following error:
Node type undefined comparison is not implemented
This is the file I'm trying to compare
And using the defaults as in the home page
Thanks in advanced
The text was updated successfully, but these errors were encountered: