Question

XFMap - Raw Record


Badge +8

Currently I have an XFMap file to parse attributes, but I'm looking at creating an attribute with the raw XML of the item to write out as a CLOB. Is there an easy way to add this into the xfmap to include it as an attribute when parsing out all the other attributes? I've tried mapping match=".", mapping match="*.", mapping match="*" all which don't work correctly.

Thanks in advance!

== Feature-Map to parse out each item ==

<feature-map multi-feature-construction="true"><mapping match="item"><feature-type><literal expr="Feature"/></feature-type></mapping></feature-map>

== Feature-Content-Map (what I'm trying to get to work ==

<mapping match="."><attributes><attribute><name><literal expr="RAW_XML"/></name><value><extract expr="." /></value></attribute></attributes></mapping>


4 replies

Userlevel 4
Badge +25

I think it must be an * character. I've seen a couple of examples by doing a search in our systems that look like this:

"georss:*"

"PNRDetails/*"

And in fact in the help docs I found this:

Using wildcards: In addition, each QName either in the match QName or in the match ancestors may be substituted by a wildcard, *, that matches any QName. The wildcard can also be specified either in the prefix and/or the local-name of a QName: *:local-name, or prefix:*, or *:* (which is the same as a single *).

...though having said that, this is far from my area of expertise, and this may not be what you want. Best to post this question to the support team and have them ask our XML developers.

Badge +8

I think it must be an * character. I've seen a couple of examples by doing a search in our systems that look like this:

"georss:*"

"PNRDetails/*"

And in fact in the help docs I found this:

Using wildcards: In addition, each QName either in the match QName or in the match ancestors may be substituted by a wildcard, *, that matches any QName. The wildcard can also be specified either in the prefix and/or the local-name of a QName: *:local-name, or prefix:*, or *:* (which is the same as a single *).

...though having said that, this is far from my area of expertise, and this may not be what you want. Best to post this question to the support team and have them ask our XML developers.

I would have thought a wildcard would have worked for the match as well. Guess I'll hit up the support/dev team :)
Badge
I would have thought a wildcard would have worked for the match as well. Guess I'll hit up the support/dev team :)

Hi there, old thread but was there an answer to this one?

Userlevel 2
Badge +13
I would have thought a wildcard would have worked for the match as well. Guess I'll hit up the support/dev team :)

Hello @stevenjh​ , would you consider posting a new question to the FME Community, and including more specific details about your use case/goal with XFMap? Feel free to link your new post here as well, to help get more feedback! Best, Kailin.

Reply