Details
Description
I need to be able to know what the parent type is when doing a conversion, which is most easily established by being able to get at the PathTracker, but, there is no API that exposes it.
For now, I'm therefore adding the following to PathTrackingReader:
public PathTracker getPathTracker()
{ return pathTracker; }My first attempt was:
reader.moveUp();
String parent = reader.getNodeName();
reader.moveDown();
Which seemed to work... until I discovered that I'd inadvertently gobbled up the next sibling element!
And instead, I can now do:
PathTrackingReader ptr = (PathTrackingReader) reader;
PathTracker tracker = ptr.getPathTracker();
String path = tracker.getPath().toString();
int end = path.lastIndexOf('/');
int start = path.lastIndexOf('/', end - 1) + 1;
String parent = path.substring(start, end);
Would you please consider making the above use case supported, either by my API change, or by another means?
It's been a year... is this likely to be addressed??