Remove usages of AttributeNode

This commit is contained in:
Clément Fournier
2019-04-28 20:48:13 +02:00
parent 0b9e68cf86
commit 8cea774776
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ public class DumpFacade {
// Extras
List<String> extras = new ArrayList<>();
Iterator<Attribute> iterator = node.getAttributeIterator();
Iterator<Attribute> iterator = node.getXPathAttributesIterator();
while (iterator.hasNext()) {
Attribute attribute = iterator.next();
extras.add(attribute.getName() + "=" + StringUtil.escapeWhitespace(attribute.getValue()));

View File

@ -400,7 +400,7 @@ public class XmlParserTest {
private void assertNode(Node node, String toString, int childs, Object... atts) {
Assert.assertEquals(toString, String.valueOf(node));
Assert.assertEquals(childs, node.jjtGetNumChildren());
Iterator<Attribute> attributeIterator = ((XmlNode) node).getAttributeIterator();
Iterator<Attribute> attributeIterator = node.getXPathAttributesIterator();
if (atts != null) {
for (int i = 0; i < atts.length; i += 2) {
Assert.assertTrue(attributeIterator.hasNext());
@ -440,7 +440,7 @@ public class XmlParserTest {
Assert.assertEquals(toString, String.valueOf(node));
Assert.assertEquals(0, node.jjtGetNumChildren());
Assert.assertEquals(text, StringUtil.escapeWhitespace(node.getImage()));
Iterator<Attribute> attributeIterator = ((XmlNode) node).getAttributeIterator();
Iterator<Attribute> attributeIterator = node.getXPathAttributesIterator();
Assert.assertTrue(attributeIterator.hasNext());
Attribute attribute = attributeIterator.next();
Assert.assertEquals("Image", attribute.getName());