Skip to main content
Question

XMLXQueryExtractor is putting up a fight

  • September 19, 2019
  • 1 reply
  • 24 views

bruceharold
Supporter
Forum|alt.badge.img+19

Hi

I want to extract some values from an XML attribute, example content is in the attached file.

The file doesn't display properly in my browser, download it and use an editor to inspect it.

If I use https://www.freeformatter.com/xpath-tester.html with the following queries they work:

//gmd:title/gco:CharacterString/text()

Text='Straßenbaulast'

//gmd:organisationName/gco:CharacterString/text()

Text='SAALKREIS

//gmd:CI_RoleCode/@codeListValue

Attribute='codeListValue=http://inspire.ec.europa.eu/codelist/RelatedPartyRoleValue/owner'

XMLXQueryExtractor throws errors, e.g.for the first query:

`fme_rejection_message' has value `The following error occurred near line 1, column 4 of the query: "gmd": can not expand namespace prefix to URI'

Can someone give me some tips on how to handle the namespaces. I find the help a bit short on examples and the W3C resources impervious to reason.

Thanks

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

bruceharold
Supporter
Forum|alt.badge.img+19
  • Author
  • Supporter
  • 346 replies
  • September 19, 2019

I figured it out by trial and error, added the declarations like this:

declare namespace gmd="http://www.isotc211.org/2005/gmd";

 

declare namespace gco="http://www.isotc211.org/2005/gco";