GroovyUtils XMLHolder throwing Xpath syntax error when XML node value contains escaped character.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GroovyUtils XMLHolder throwing Xpath syntax error when XML node value contains escaped character.
GroovyUtils throwing error when XML node value contains escaped characters.
In my script, I'm accessing a node that contains the description of an error. That node when read by my XMLHolder throws this error:
- Caused by: java.lang.RuntimeException: net.sf.saxon.trans.XPathException: XPath syntax error at char 9 on line 2 in {\nInvalid part number}:
- Unexpected token name "part" beyond end of expression
It appears that the node I'm reading contains the value "\n", and when the holder tries to read it, it throws the error.
How can I read the node, with the escaped value, and not bomb out?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @tadudek , any updates on this? Thank you!
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Frankly, this was taking way too long, and with all the craziness in the world, I can't spend any time on it right now. I went back the long (and tedious) way, and changed my groovy datasink back to an excel data sink, and now need to manually map xml nodes back to excel row-cells. (This really doesn't do what I want it to do, but it'll do for now.)
I created an enhancement request for the excel datasink, because it forces you to map recurring elements, which is weird.
And from a groovy perspective, there just isn't enough documentation on the groovy datasink to best do what I would like to do. I feel like I'm doing too much guessing.
I'll follow up next week with some attempt at the communities changes. Thanks -tadudek
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@tadudek , thank you for the update, really appreciated. Do not hesitate to ask the Community if you come across any questions along the way.
Sonya Mihaljova
Community and Education Specialist

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »