Here is my input XML:
<AllTitleByOrder>
<CustProp name="Title of x CP" CPID='x'/>
<CustProp name="Title of y CP" CPID='y'/>
<CustProp name="Title of z CP" CPID='z'/>
</AllTitleByOrder>
<ResultSet>
<ResultItem …>
<Document ContentType="document" … >
<CustomProperties>
<CustPropItem CPID='x' value="value of x for doc"/>
</CustomProperties>
</Document>
<Document ContentType="document" … >
<CustomProperties>
<CustPropItem CPID='x' value="value of x for doc"/>
<CustPropItem CPID='y' value="value of y for doc"/>
<CustPropItem CPID='z' value="value of z for doc"/>
</CustomProperties>
</Document>
</ResultItem>
<ResultItem …>
<Document ContentType="research" … >
<CustomProperties>
<CustPropItem CPID='y' value="value of y for rsr"/>
</CustomProperties>
</Document>
</ResultItem>
<ResultItem>
<Document ContentType="pleading" … >
<CustomProperties>
<CustPropItem CPID='z' value="value of z for pldg"/>
</CustomProperties>
</Document>
</ResultItem>
</ResultSet>
I need the output to look like this:
Title of x CP ---------- Title of y CP ---------- Title of z CP
value of x for doc
value of x for doc value of y for rsr value of z for pldg
value of y for rsr
value of z for pldg
My trouble is filtering (output value of x for title X ONLY) since all content is under the same XML tag (namely Document).
I'm looping through //AllTitleByOrder/CustProp/@CPID but I'm not sure how to select the right value (corresponding to the right title) or just add white space.
