Thomas Casteleyn
Thomas Casteleyn
Website seems down again. Also the public test service is down. Same counts for the one from @Lostboi: snmpsim.try.thola.io
Hi, it seems like we are trying to do the same, but my xml looks a bit different: (simplified) ```xml field1 field2 31854 159773 ``` Anyway, for your schema, I...
@zhengchun?
Doesn't that only select `cd` nodes of which title attribute equals their ref attribute? Edit: wow that actually worked.. Thanks man!
Scrap that, it seems it didn't work, it always picks the first one in this case: `../../measType[@p=@p]` (as I would expect)
That gives the same result. Its strange, as I was really under the impression your solution first worked.. Anyway, this is a simplified version of the file: ```xml field1 field2...
That's even worse, now all metrics have field name `field1`. The Path is run on each `r` node. So I think only `../../measType[@p=current()/@p]` would work..
Well, yeah. I can't change the code. I'm using telegraf: https://github.com/influxdata/telegraf/blob/6dc2b99549b3fc4684295ebcd2975cee96a1fa28/plugins/parsers/xpath/parser.go#L419-L447
Indeed, see [GO playground](https://go.dev/play/p/qeMkl0NqoOT) vs [XPather](http://xpather.com/STcNPbO8). Can I help with trying to fix it? Edit: And what should be the correct path be after the fix? `../../measType[@p]` or `../../measType[@p=@p]`?
No, I have an `r` and need an xpath to find it’s measType. Your xpath selects every r that has a corresponding measType.