Skip to content

Commit

Permalink
CLDR-17540 SimpleXPathParts: retain original XPath
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Apr 12, 2024
1 parent 2ec8def commit 83c6886
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public boolean containsAttribute(String attribute) {
}

final List<Element> elements = new LinkedList<>();
private final String xpath;

@Override
public String getElement(int i) {
Expand Down Expand Up @@ -101,9 +102,15 @@ protected void handleAddAttribute(String attribute, String value) {
}

SimpleXPathParts(String xpath) {
this.xpath = xpath;
handleParse(xpath, true);
}

@Override
public String toString() {
return xpath;
}

/**
* Parse an XPath string into a read-only structure.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ public interface XPathValue {

/** Does this xpath contain the attribute at all? */
public boolean containsAttribute(String attribute);

/** return the original string */
public String toString();
}

0 comments on commit 83c6886

Please sign in to comment.