diff options
author | Simon Rettberg | 2021-07-02 11:04:26 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-02 11:04:26 +0200 |
commit | 1d98a45b126bba4eea952b448f5070f61be533fe (patch) | |
tree | ba308d85109a092a27ef931b6df87f4a54369dfb | |
parent | [tests] Print actual output if it doesn't match expected output (diff) | |
download | master-sync-shared-1d98a45b126bba4eea952b448f5070f61be533fe.tar.gz master-sync-shared-1d98a45b126bba4eea952b448f5070f61be533fe.tar.xz master-sync-shared-1d98a45b126bba4eea952b448f5070f61be533fe.zip |
libvirt-xml: Add speed hack for "." XPath query
-rw-r--r-- | src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java index 2110f7a..c4ad2c3 100644 --- a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java +++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java @@ -159,6 +159,9 @@ public class LibvirtXmlNode implements LibvirtXmlCreatable, LibvirtXmlEditable @Override public Node getXmlNode( String expression ) { + if ( XPATH_EXPRESSION_CURRENT_NODE.equals( expression ) ) { + return this.xmlBaseNode; + } NodeList nodes = this.getXmlNodes( expression ); return nodes.item( 0 ); } |