I have an XML file that resembles:
######BEGIN#######
<maincontainers>
<container ID="DD364AA5-C09F-0662-D2A6372503A93F48" menu="yes" name="Visit">
<content ID="239" label="rt-239" ctcd="FCT">test</content>
<content ID="240" label="345345-240" ctcd="FAQ">345345</content>
<content ID="252" label="all-about-flowers-252" ctcd="WEB">All about Flowers</content>
<container ID="4F1F609F-C09F-0662-D2E8527FEE4037C4" menu="yes" name="Visit the Garden">
<content ID="254" label="visit-the-garden-254" ctcd="WEB">Visit the Garden</content>
</container>
<container ID="4F1FB6AF-C09F-0662-D24C4E0656BB62DF" menu="yes" name="About the Garden">
<content ID="255" label="about-the-garden-255" ctcd="WEB">About the Garden</content>
</container>
<container ID="4F204022-C09F-0662-D2CFF7B76EE9F437" menu="yes" name="Glasshouse and Garden Tour">
<content ID="256" label="glasshouse-and-garden-tour-256" ctcd="WEB">Glasshouse and Garden Tour</content>
</container>
<container ID="4F21774A-C09F-0662-D2BBAFBE84EE75F0" menu="yes" name="Contact Us">
<content ID="257" label="contact-us-257" ctcd="BLB">Contact Us</content>
</container>
</container>
</mainContainers>
######END#######
What I am trying to accomplish is to build an XPath Query that will enable me get the parent container.
If the parent of this XML Document is:
ID="DD364AA5-C09F-0662-D2A6372503A93F48"
If I am in a child container how can I accomplish to writing a XPath to find the parent from the child?
THANK YOU VERY MUCH!!!!!
######BEGIN#######
<maincontainers>
<container ID="DD364AA5-C09F-0662-D2A6372503A93F48" menu="yes" name="Visit">
<content ID="239" label="rt-239" ctcd="FCT">test</content>
<content ID="240" label="345345-240" ctcd="FAQ">345345</content>
<content ID="252" label="all-about-flowers-252" ctcd="WEB">All about Flowers</content>
<container ID="4F1F609F-C09F-0662-D2E8527FEE4037C4" menu="yes" name="Visit the Garden">
<content ID="254" label="visit-the-garden-254" ctcd="WEB">Visit the Garden</content>
</container>
<container ID="4F1FB6AF-C09F-0662-D24C4E0656BB62DF" menu="yes" name="About the Garden">
<content ID="255" label="about-the-garden-255" ctcd="WEB">About the Garden</content>
</container>
<container ID="4F204022-C09F-0662-D2CFF7B76EE9F437" menu="yes" name="Glasshouse and Garden Tour">
<content ID="256" label="glasshouse-and-garden-tour-256" ctcd="WEB">Glasshouse and Garden Tour</content>
</container>
<container ID="4F21774A-C09F-0662-D2BBAFBE84EE75F0" menu="yes" name="Contact Us">
<content ID="257" label="contact-us-257" ctcd="BLB">Contact Us</content>
</container>
</container>
</mainContainers>
######END#######
What I am trying to accomplish is to build an XPath Query that will enable me get the parent container.
If the parent of this XML Document is:
ID="DD364AA5-C09F-0662-D2A6372503A93F48"
If I am in a child container how can I accomplish to writing a XPath to find the parent from the child?
THANK YOU VERY MUCH!!!!!