1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.jelly.tags.xmlunit;
18
19 import org.apache.commons.jelly.JellyTagException;
20 import org.apache.commons.jelly.XMLOutput;
21 import org.dom4j.Document;
22 import org.dom4j.io.SAXReader;
23
24 public class ExpectedTag extends XMLUnitTagSupport {
25
26 public void doTag(XMLOutput output) throws JellyTagException {
27 Document expectedDocument = parseBody();
28
29 AssertDocumentsEqualTag assertTag =
30 (AssertDocumentsEqualTag) findAncestorWithClass(AssertDocumentsEqualTag
31 .class);
32 assertTag.setExpected(expectedDocument);
33 }
34
35 protected SAXReader createSAXReader() {
36 return new SAXReader();
37 }
38
39 }