Skip to main content

Hi,

I think the best FME Transfomer for such type of extractions is the "XMLXQueryExtractor", but I do not know how to build the query.

The XML is contained within an attribute and could be something like this:

 

"<?xml version="1.0" encoding="UTF-16"?><value xmlns="http://spec.tn-its.eu/schemas/"> <gml:measure uom="kph" xmlns:gml="http://www.opengis.net/gml/3.2">50</gml:measure> </value>"

 

For that particular case, I wanted to extract that "50" value from that XML.

Thanks!

 

 

 

So something like this should work, where XML Input is Attribute specifying XML

declare namespace gml='http://www.opengis.net/gml/3.2';
//gml:measure/text()

Unfortunately, my knowledge of xml and xquery is fairly limited so I can't really explain how or why you'd arrive at this answer!


Reply