use of nokogiri.internals.ReaderNode.ClosingNode in project nokogiri by sparklemotion.
the class XmlReader method getOuterXml.
private String getOuterXml() {
ReaderNode current = currentNode();
if (current == null || current.depth < 0)
return null;
if (current instanceof ClosingNode) {
return "<" + current.name + "/>";
}
StringBuilder sb = new StringBuilder();
for (int i = position; i <= current.endOffset; i++) {
sb.append(nodeQueue.get(i).getString());
}
return new String(sb);
}
use of nokogiri.internals.ReaderNode.ClosingNode in project gocd by gocd.
the class XmlReader method getOuterXml.
private String getOuterXml() {
ReaderNode current = currentNode();
if (current.depth < 0)
return null;
if (current instanceof ClosingNode) {
return "<" + current.name + "/>";
}
StringBuffer sb = new StringBuffer();
for (int i = position; i <= current.endOffset; i++) {
sb.append(nodeQueue.get(i).getString());
}
return new String(sb);
}
Aggregations