Putting information from XML-Paths in an Array
Posted: Wed Apr 25, 2018 5:13 pm
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
<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