Hi,
dont know if this is correct forum to post. kindly ignore if this is wrong place to post. i am in need of help on below libxml2, xpath stuff
i have the below xml file
<?xml version="1.0"?>
<License version="1">
<ActivationInfo>
<ActivationDate></ActivationDate>
<IssueDate>22-Dec-2015</IssueDate>
</ActivationInfo>
<MachineInfo>
<MachineName></MachineName>
<SoftwareIds></SoftwareIds>
</MachineInfo>
<LicenseKeys>
<LicenseKey>
<LicenseVersion>1</LicenseVersion>
<FeatureName>PLI_FEATURE1</FeatureName>
<LicenseType>PERMANENT</LicenseType>
<CustomProperties>
<CustomProperty>
<key>LICENSETYPE</key>
<value>EVAL</value>
</CustomProperty>
<CustomProperty>
<key>CAPACITY</key>
<value>10</value>
</CustomProperty>
<CustomProperty>
<key>CAPACITY_UNIT</key>
<value>TB</value>
</CustomProperty>
</CustomProperties>
</LicenseKey>
<LicenseKey>
<FeatureName>PLI_FEATURE2</FeatureName>
<LicenseType expirationDate="01-Jan-2017">EVALUATION</LicenseType>
<CustomProperties>
<CustomProperty>
<key>LICENSETYPE</key>
<value>EVAL</value>
</CustomProperty>
<CustomProperty>
<key>CAPACITY</key>
<value>10</value>
</CustomProperty>
<CustomProperty>
<key>CAPACITY_UNIT</key>
<value>TB</value>
</CustomProperty>
</CustomProperties>
</LicenseKey>
<LicenseKey>
<FeatureName>PLI_FEATURE3</FeatureName>
<LicenseType>SUBSCRIPTION</LicenseType>
<CustomProperties>
<CustomProperty>
<key>LICENSETYPE</key>
<value>EVAL</value>
</CustomProperty>
<CustomProperty>
<key>CAPACITY</key>
<value>10</value>
</CustomProperty>
<CustomProperty>
<key>CAPACITY_UNIT</key>
<value>TB</value>
</CustomProperty>
<CustomProperty>
<key>START_DATE</key>
<value>10-Jun-2015</value>
</CustomProperty>
<CustomProperty>
<key>END_DATE</key>
<value>09-Jun-2016</value>
</CustomProperty>
<CustomProperty>
<key>GRACE_PERIOD</key>
<value>23-Jun-2016</value>
</CustomProperty>
</CustomProperties>
</LicenseKey>
</LicenseKeys>
</License>
i need to generate a set of sub nodes/ elements as output for every FeatureName we pass as input.
Example, if we pass PLI_FEATURE3 as input, the output should be set of node where this feature name is present. here it should display the last <LicenseKey>...</LicenseKeys> complete information.
Please help me to get this output. attached is the sample xml.
Thanks