I have an XML and I want to get the Xml Node values dynamically. I want to Pass the Node Name and the in return the function or SP should return me the value of that Node.
<ClassificationTypeEntity>
<LTABLE_ID>3170</LTABLE_ID>
<LTABLE_CODE>script Code</LTABLE_CODE>
<LTABLE_DESC>alert(''hello'')</LTABLE_DESC>
<ACTIVE_YES_NO>1</ACTIVE_YES_NO>enter code here
<PRIVATE_FILING>0</PRIVATE_FILING>
<RETENTION_CODE /><RETENTION_TITLE />
<LTABLE_ID_P>0</LTABLE_ID_P>
</ClassificationTypeEntity>;
For Example, In the above xml, when I want the value of LTABLE_CODE Node, I will pass the same and the result should I get is
script code
Same for LTABLE_DESC the result should be alert(''hello'')
However I can write the 2 Xpath query for both but in case my schema gets changed (more properties added or removed) then I will have to change my SP also.
Thanks, Mohit Jain
//LTABLE_CODEand//LTABLE_DESC