I have an XML document in the following format:
<Contents>
<Content Name="ClientXML">
<EntityData>
<Data Name="EQ_EligibleForGuaranteedIssue">Yes</Data>
<Data Name="ABRInd">NO</Data>
<Data Name="AC_AgentNo">12345</Data>
<Data Name="AC_AgentPersonallyMetWithApplicant">Has</Data>
<Data Name="AC_City">Pomona</Data>
<Data Name="AC_FirstName">Kimmy</Data>
<Data Name="AC_FullName">Kimmy N Jackson</Data>
<Data Name="AC_Initials">K J</Data>
<Data Name="AC_LastAndSuf">Jackson</Data>
...
</EntityData>
</Content>
<Content Name="UserXML">
<EntityData>
<Data Name="TransRefGUID">789-456-123456789-456</Data>
...
</EntityData>
</Content>
</Contents>
Other information:
- There can be several thousand 'Data' nodes under each 'EntityData' object
- The value of any 'Name' attribute is never duplicated.
I have to create an XSL transform and am using the xsl:value-of select="..." function. My question is, what XPath expression is going to execute the fastest? For example
<xsl:value-of select="\\Contents\Content[@Name="ClientXML"\EntityData\Data[@Name=".."]">
or simply
<xsl:value-of select="\\Data[@Name=".."]">
I don't have access to the end server which will eventually run this process, and locally the second option may appear to be a little faster.
Wondering if anyone has an opinion, and on a much larger scale if one may be faster.
Thanks!