From what I understand, this parses the following snippet:

<path-entry>
  <prefix>coolprefix</prefix>
  <target-path>/coolprf</target-path>
  <target-path>/c00lprf</target-path>
  <target-path>/c00l</target-path>
</path-entry>

Right? Perhaps a comment with a sample input and output would be nice, even though the rest of the code is not as gentle.