Skip to content

Commit

Permalink
getOrAdd(): xmlns safe XPath
Browse files Browse the repository at this point in the history
  • Loading branch information
SoltauFintel committed May 10, 2017
1 parent 9dfbb15 commit 1a87924
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Advantages:
* and some more special functions.

Use with Gradle:
<pre>compile 'de.mwvb:xmldocument:0.2.3'</pre>
<pre>compile 'de.mwvb:xmldocument:0.2.4'</pre>

Use with Maven:
<pre>&lt;dependency>
&lt;groupId>de.mwvb&lt;/groupId>
&lt;artifactId>xmldocument&lt;/artifactId>
&lt;version>0.2.3&lt;/version>
&lt;version>0.2.4&lt;/version>
&lt;/dependency></pre>
2 changes: 1 addition & 1 deletion xmldocument/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java'
apply plugin: 'eclipse'

version = '0.2.3'
version = '0.2.4'
group = 'de.mwvb'
archivesBaseName = 'xmldocument'
project.description = 'DOM4J wrapper for easy use'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public XMLElement addWithAttributes(String elementname, String... attr) {

@Override
public XMLElement getOrAdd(String elementname) {
XMLElement ret = selectSingleNode(elementname);
XMLElement ret = selectSingleNode("*[name()='" + elementname + "']");
return ret == null ? add(elementname) : ret;
}

Expand Down

0 comments on commit 1a87924

Please sign in to comment.