diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-17 19:04:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-17 19:04:28 +0100 |
commit | 514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (patch) | |
tree | 555c194dbeb0fb2ac4ad3cde7c0f6a80fd330ce2 /dev-java/dom4j/files | |
parent | 4df3bf9762850b34cd1ead5c80374d1a0fc3362e (diff) |
gentoo resync : 17.07.2021
Diffstat (limited to 'dev-java/dom4j/files')
-rw-r--r-- | dev-java/dom4j/files/dom4j-2.1.3-xpp3-add-removeAttribute.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/dev-java/dom4j/files/dom4j-2.1.3-xpp3-add-removeAttribute.patch b/dev-java/dom4j/files/dom4j-2.1.3-xpp3-add-removeAttribute.patch new file mode 100644 index 000000000000..a58a06dfcd61 --- /dev/null +++ b/dev-java/dom4j/files/dom4j-2.1.3-xpp3-add-removeAttribute.patch @@ -0,0 +1,47 @@ +diff --git a/src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java b/src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java +index 08b88fc..aa27c10 100644 +--- a/src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java ++++ b/src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java +@@ -211,7 +211,7 @@ public class ProxyXmlStartTag implements XmlStartTag { + * @throws XmlPullParserException + * DOCUMENT ME! + */ +- public void removeAtttributes() throws XmlPullParserException { ++ public void removeAttributes() throws XmlPullParserException { + if (element != null) { + element.setAttributes(new ArrayList()); + +@@ -221,6 +221,33 @@ public class ProxyXmlStartTag implements XmlStartTag { + } + } + ++ public boolean removeAttributeByName(String namespaceURI, String localName) throws XmlPullParserException { ++ if (element != null) { ++ for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) { ++ Attribute attribute = iter.next(); ++ ++ if (namespaceURI.equals(attribute.getNamespaceURI()) ++ && localName.equals(attribute.getName())) { ++ return element.remove(attribute); ++ } ++ } ++ } ++ return false; ++ } ++ ++ public boolean removeAttributeByRawName(String rawName) throws XmlPullParserException { ++ if (element != null) { ++ for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) { ++ Attribute attribute = iter.next(); ++ ++ if (rawName.equals(attribute.getQualifiedName())) { ++ return element.remove(attribute); ++ } ++ } ++ } ++ return false; ++ } ++ + public String getLocalName() { + return element.getName(); + } |