Hello, I got a XML-File looking kind of like this:
<Report>
<PreflightResult errors="0" criticalfailures="0" noncriticalfailures="0" signoffs="0" fixes="0" warnings="2">
<PreflightResultEntry type="Check" level="warning">
<PreflightResultEntryMessage xml:lang="de-DE">
<Message>Number of pages is wrong </Message>
</PreflightResultEntryMessage>
</PreflightResultEntry>
<PreflightResultEntry type="Check" level="warning">
<PreflightResultEntryMessage xml:lang="de-DE">
<Message> Size is wrong</Message>
</PreflightResultEntryMessage>
</PreflightResultEntry>
...
</PreflightResult>
</Report>
Now I want to select all the "<message>"-tags. But i dont know how many there are, because every report can be different. So my idea was to select them in an array, and I could do this by using "Metadata.TextIndexed", but Switch shows an error that only a single path can be selected.
I hope I was able to describe my problem correctly, I'd be glad if someone maybe could help me.
Thanks in advance,
w2pcrew
Putting information from XML-Paths in an Array
Re: Putting information from XML-Paths in an Array
I would be inclined to say you need a XSLT transformation to return only the Message values in a new XML. This way you will have only what you need
But the XSLT is not so much of my fields of expertise, so should that be the case - I'd leave that to have more experienced folks here to help you with this
But the XSLT is not so much of my fields of expertise, so should that be the case - I'd leave that to have more experienced folks here to help you with this
-
- Member
- Posts: 93
- Joined: Fri Jul 08, 2011 10:31 am
- Location: The Netherlands
Re: Putting information from XML-Paths in an Array
When building the location path, you sould set the "Location path syntax" to "XPath expression" and then set "Result data type" to "Text Indexed".
This wil result in a ;-separated list.
This wil result in a ;-separated list.