70 questions
0
votes
0
answers
42
views
How to compare XMLs and their nested content?
I have the following structure that I need to compare:
<ROOT>
<name>
<name>string</name>
<type>number</type>
<server>string</...
0
votes
0
answers
104
views
Compare differences between two XML's for XPATH attribute/element and values
I have two XML's and i need differnece between those XML's as explained below:
F6.XML:
<MetaData xmlns="urn:wco:datamodel:WCO:DocumentMetaData-DMS:2">
<Declaration xmlns="urn:...
3
votes
1
answer
165
views
getting 'ERROR: 'Syntax error in '. castable as xs:integer' while Trying to transform xml, based on Data type of value the tag is containing
here is my _ignoreText.xsl file
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes" indent="no" />
<xsl:template match="*|...
0
votes
1
answer
713
views
When comparing XML files, how to get detailed response using XMLUnit 2.8.2
I need help with ComparisonFormatter. I've not been able to find many examples on ComparisonFormatter online.
I'm using XMLUnit 2.8.2.
I'm trying to compare two xml files regardless of their order. ...
0
votes
1
answer
103
views
how to compare prefixed with no prefix xml documents in xmlunit to get similar result
xmlnit does not recognize the following two xml "identical" (except one has defined namespace) documents to be similar:
<?xml version="1.0" encoding="UTF-8" standalone=...
0
votes
2
answers
2k
views
XMLUnit - compare xml and ignore few tags based on a condition
I have couple of xmls which needs to be compared with different set of similar xml and while comparing i need to ignore tags based on a condition, for example
personal.xml - ignore fullname
address....
0
votes
1
answer
278
views
XMLUnit-2 ignore certain nested XML elements
My XML is little complex and I've to ignore certain entry from the comparison, how would I able to achieve it ?
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE ResourceObject PUBLIC "...
0
votes
0
answers
463
views
XMLUnitException - Caught exception during comparison
Caught exception during comparison] Exception[org.xmlunit.XMLUnitException] follows: org.xmlunit.XMLUnitException: Caught exception during comparison at org.xmlunit.diff.DOMDifferenceEngine.compare(...
0
votes
1
answer
877
views
How to print all differences when comparing two xml files using XMLUnit2
Using XMLUnit2 to compare two xml files using groovy in soapui, it's comparing two files successfully.Would like to print all differences what it finds, but it just printing only first difference. ...
1
vote
0
answers
261
views
Using XMLUnit to compare xml
I am trying to compare two xml files with attributes and child elements regardless of the xml tag order. I am using XMLUnit for same. I created a diff using mentioned code and was expecting that it ...
0
votes
1
answer
142
views
How can I compare map-like elements with XMLUnit
I have below xml data:
Control:
<Data>
<propertyValues>
<propertyName>Name1</propertyName>
<value>
<text>
...
0
votes
0
answers
99
views
How to fix "java.io.NotSerializableException" on running remote library function in Jenkins pipeline
I am setting up a Jenkins Pipeline, which calls an external library with a compare XML function written in Groovy that utilises xmlunit.
The function looks as follows:
import java.util.List
import ...
1
vote
2
answers
1k
views
Comparing two XMl files ignoring element and attribute order Java eclipse
Iam new to this field and has been assigned with a challenging task.
I have 2 XML files (namely Test1 & Test 2 as mentioned below). And i need to compare these xml files using java and return ...
5
votes
1
answer
2k
views
How to ignore XML declaration differences with XmlUnit?
How can I configure XmlUnit.Net to ignore the XML declaration when comparing two documents?
Assume I have the following control document:
<?xml version="1.0" encoding="utf-8"?>
<a><...
0
votes
2
answers
797
views
How do I map/ignore certain tag when comparing XML?
I'm comparing 2 XML using XMLUnit 2.xx both of them have the same structure except for the root node name :
<expectedValue>
<elementA>something</elementA>
<elementB>...
2
votes
0
answers
2k
views
XMLUnit to ignore element order
I want XMLUnit to ignore order when comparing. Is there a way to control that?
Eg:
parameter1
value1
parameter2
value 2
if compared with
parameter2
value2
parameter1
value1
should not return any ...
0
votes
1
answer
837
views
XMLUnit tag containing name attribute not matching
I am using xmlunit 2.5.0.
Below are my two xml string : One is the controlxml and one is testxml.
String controlXml = "<flowers><flower><f1 name = \"Roses\"/></flower><...
0
votes
1
answer
265
views
Creating excel after finding differences in XML
First of all thanks for this great utility "XMLUnit".
I have a requirement where I want to compare 2 XML's and find the differences. Once the differences are found, I need to generate an excel report ...
1
vote
2
answers
2k
views
XMLDiff / XMLUnit - Ignore Child Order & use of wildcards
I am currently struggling with an issue when comparing 2 xmls - original and reference for differences. The trouble is when I try to apply wildcards for comparison with different child order - ...
1
vote
1
answer
1k
views
XMLUnit 2 DiffBuilder ignoreComments() raises exception with Saxon HE
The following simple example demonstrates the problem:
import org.xmlunit.builder.DiffBuilder;
import org.xmlunit.builder.Input;
import org.xmlunit.diff.ComparisonControllers;
import org.xmlunit.diff....
0
votes
2
answers
3k
views
how to use lambda expression for jdk 7 or older versions
what are the changes that I need to make if I am using jdk 7 and want to use lambda expression?
I am comparing 2 xml files and want to ignore specific nodes hence using this expression
final Diff ...
4
votes
1
answer
1k
views
XML Unit - Using custom element selectors on different xml elements
I'm having a problem comparing various elements in my xml document with XMLUnit (2.2.1). In my document there are several xml elements and I want to
know, whether they differ from each other. However,...
0
votes
1
answer
846
views
XMLUnit how to to ignore missing attribute
I am familiar with ignoring differences in attribute values, but what is the proper way to ignore an attribute by name altogether? How do I make these two documents evaluate as similar?
Doc1:
<a ...
1
vote
1
answer
868
views
xmlunit: Error with ElementSelectors.conditionalBuilder
So I have the following input, expected output and actual output xml:
input.xml
<Request>
<EmailSubjectLine>Main Contact & No Reported To</EmailSubjectLine>
<...
0
votes
1
answer
2k
views
xml ns attribute to ignore using xml unit
this is my code
Scanner s = new Scanner(new File("ignore.txt"));
final ArrayList<String> list = new ArrayList<String>();
while (s.hasNext()){
list....