Hi all, I have the following setup and I would like to extract the username from this XML. I am currently using tExtractXMLField and I've tried this xpath query /sample/@UserName but I get an error of: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog. It feels like I am missing something. Any assistance would be greatly appreciated. Thanks!!
This works for me in 5.6.1: tFixedFlowInput > tConvertType > tExtractXMLField > tLogRow tFixedFlowInput has line separator "$", field separator "£" tConvertType convert string to Document with "automatic conversion" checkbox activated tExtractXMLField loop on "/", with one output field "data" with xpath "/sample/@UserName" I think that your input XML is invalid, check this with a tLogRow. Maybe a space or a BOM ?
> Content is not allowed in prolog. Nested exception: Content is not allowed in prolog. I had the same problem with a tFixedFlowInput and the XML prefixed/suffixed by ". Then, if you see a Sax error, check if you have the character " around the XML, and remove it.