Maintains the current
Path as a stream is moved through.
Can be linked to a HierarchicalStreamWriter or
HierarchicalStreamReader by wrapping them with a
PathTrackingWriter or
PathTrackingReader.
Example
PathTracker tracker = new PathTracker();
tracker.pushElement("table");
tracker.pushElement("tr");
tracker.pushElement("td");
tracker.pushElement("form");
tracker.popElement("form");
tracker.popElement("td");
tracker.pushElement("td");
tracker.pushElement("div");
Path path = tracker.getPath(); // returns "/table/tr/td[2]/div"
See Also: Path See Also: PathTrackingReader See Also: PathTrackingWriter author: Joe Walnes |