Activity for MonishaM

  • MonishaM MonishaM modified a comment on discussion Open Discussion

    In our project, we are comparing two XMLs and are selectively updating the control XML based on this comparison. In certain cases the Control/Test node is null (as fetched from the Comparison.Detail object). Manipulating / updating the Control/Test XML in such a case requires us to compute the Parent Node using some other library that requires the XPath String from the getParentXPath() method. This computation of the Parent Node node is turning out to be expensive as we need to do this for every...

  • MonishaM MonishaM posted a comment on discussion Open Discussion

    Hi Stefan, We had another question for you. Currently, we can only access the XPath of the ParentNode of a given target node (computed from the Comparison.Detail object). Is there a way to get a reference to the ParentNode directly from the Comparison.Detail object? Or atleast in a future version of XMLUnit? Have opened a new Discussion Topic for this here. Please advise.

  • MonishaM MonishaM posted a comment on discussion Open Discussion

    In our project, we are comparing two XMLs and are selectively updating the control XML based on this comparison. In certain cases the Control/Test node is null (as fetched from the Comparison.Detail object). Manipulating / updating the Control/Test XML in such a case requires us to compute the Parent Node using some other library that requires the XPath String from the getParentXPath() method. This computation of the Parent Node node is turning out to be expensive as we need to do this for every...

  • MonishaM MonishaM posted a comment on discussion Open Discussion

    Hi Stefan, We tested using 2.6.3 and it worked fine. This time the XPaths were preserved despite using NodeFilters in the Difference Evaluator. Thank you very much for such an expedited response and fix! This has been very helpful.

  • MonishaM MonishaM posted a comment on discussion Open Discussion

    The problem we are facing is that, after we filter out the node Parent with id = 0, when we compute the XPath of the nodes from the Diff object, we get XPath values that are different from the original XPath values (as per the unfiltered document object). The filtering Nodes option in XMLUnit is removing all the filtered nodes from the document object before starting to evaluate. So, when we access the test and control nodes in the diff objects from the difference iterator - the test and control...

  • MonishaM MonishaM posted a comment on discussion Help

    CASE 1: Control: <grandparent> <parent id="0"> </parent> <parent id="1"> <child id="1"></child> <child id="2"></child> </parent> </grandparent> Test: <grandparent> <parent id="1"> <child id="1"></child> </parent> </grandparent> In the above example, assume <parent id="0"> tag has been ignored. And we need to update the control xml to match the test xml. So, in our case we will have to remove the tag - <child id="2"></child>.</parent> The diff builder gives - control node:<child id="2"></child> and...

  • MonishaM MonishaM modified a comment on discussion Open Discussion

    CASE 1: Control: <grandparent> <parent id="0"> </parent> <parent id="1"> <child id="1"></child> <child id="2"></child> </parent> </grandparent> Test: <grandparent> <parent id="1"> <child id="1"></child> </parent> </grandparent> In the above example, assume <parent id="0"> tag has been ignored. And we need to update the control xml to match the test xml. So, in our case we will have to remove the tag - <child id="2"></child>.</parent> The diff builder gives - control node:<child id="2"></child> and...

  • MonishaM MonishaM modified a comment on discussion Open Discussion

    CASE 1: Control: <grandparent> <parent id="0"> </parent> <parent id="1"> <child id="1"></child> <child id="2"></child> </parent> </grandparent> Test: <grandparent> <parent id="1"> <child id="1"></child> </parent> </grandparent> In the above example, assume <parent id="0"> tag has been ignored. And we need to update the control xml to match the test xml. So, in our case we will have to remove the tag - <child id="2"></child>.</parent> The diff builder gives - control node:<child id="2"></child> and...

  • MonishaM MonishaM posted a comment on discussion Open Discussion

    CASE 1: Control: <grandparent> <parent id="0/"> <parent id="1"> <child1> <child2> </child2></child1></parent> </parent></grandparent> Test: <grandparent> <parent id="1"> <child1> </child1></parent> </grandparent> In the above example, assume <parent0> tag has been ignored. And we need to update the control xml to match the test xml. So, in our case we will have to remove the tag - <child2>.</child2></parent0> The diff builder gives - control node:<child2> and test node:null We get the parent of the...

  • MonishaM MonishaM posted a comment on discussion Open Discussion

    Hi! Am using XML Unit 2.x for a project. Due to the complex Nature of the xmls being evaluated, a single element selector does not seem to be adequate to get the job done. It appears that the order in which we pass the element selectors to the DefaultNodeMatcher makes a difference. Can anyone please help me understand how the implementation works in this case for multiple Element Selectors? For example, consider the following code snippet - Diff myDiff = DiffBuilder.compare(control).withTest(test)...

1
MongoDB Logo MongoDB