Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

search xml document that has an unknown structure


S Simm

Recommended Posts

I have a process with an xml document in the form of a string as input. I would like to convert this string to xml and then search the contents using xpath expressions. (specifically I'm looking for elements with a specific name)

The problem is that the xml document could be any xml, so I don't have a xml schema for it.

Is this possible If so, how Everything xml related seems to want an XML Schema.

thanks, much obliged!

Link to comment
Share on other sites

You could use the Parse XML activity with XML validation disabled but it would be difficult to do anything with the resulting structure.

A basic approach would be to use the XPATH functions substring-before / substring-after to extract the values of the XML tags that you are looking for (it would work if you have a limited number of tags).

Another approach would be to use an XSLT transformation (with the XSLT transform activity).

You may also use an XML Any structure to handle the incoming string and then use Coercion in later Mappings.

Link to comment
Share on other sites

×
×
  • Create New...