Class GenericXmlLocator
java.lang.Object
io.jenkins.plugins.configsplice.engine.xml.GenericXmlLocator
Locates the source range addressed by a generic
XmlPath (SRS section 8.7).
Same two-pass split as DotNetAttributeLocator: StAX proves the document well formed and
safe, then XmlTagScanner — which resolves no entities and loads nothing external — computes
exact ranges over the proven-good text.
The difference is navigation. Where the shorthands look for one known element shape, this walks an arbitrary chain of element steps, and therefore has to decide what "the" element means when several match. It never guesses: an unindexed step matching more than one sibling is an ambiguity error, because silently taking the first would make the build depend on document ordering the user cannot see.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA located target: an attribute value, or an element's text. -
Method Summary
Modifier and TypeMethodDescriptionstatic GenericXmlLocator.LocatedFinds the target addressed bypath.
-
Method Details
-
locate
Finds the target addressed bypath.- Throws:
SpliceException-ErrorCode.PATH_MISSINGwhen a step, attribute or text target does not exist,ErrorCode.PATH_AMBIGUOUSwhen an unindexed step matches more than one sibling,ErrorCode.PARSE_FAILEDon malformed or unsafe input
-