check in multiple xml file element value is match?

wontgetschooled

New Member
this is my general.xml file:-general.xmlthis is my region.xml file:-<childrens> <child_4893 entity_id="4893" value="http://stackoverflow.com/questions/15585433/Gujarat" parent_id="4823"> <child_4894 entity_id="4894" value="http://stackoverflow.com/questions/15585433/Ahmedabad" parent_id="4893"/> <child_4895 entity_id="4895" value="http://stackoverflow.com/questions/15585433/Anand" parent_id="4893"/> <child_4896 entity_id="4896" value="http://stackoverflow.com/questions/15585433/Bharuch (Broach)" parent_id="4893"/> <child_4897 entity_id="4897" value="http://stackoverflow.com/questions/15585433/Bhavnagar" parent_id="4893"/> <child_4898 entity_id="4898" value="http://stackoverflow.com/questions/15585433/Bhuj" parent_id="4893"/> <child_4899 entity_id="4899" value="http://stackoverflow.com/questions/15585433/Gandhidham" parent_id="4893"/> <child_4900 entity_id="4900" value="http://stackoverflow.com/questions/15585433/Gandhinagar" parent_id="4893"/> <child_4901 entity_id="4901" value="http://stackoverflow.com/questions/15585433/Godhra" parent_id="4893"/> <child_4902 entity_id="4902" value="http://stackoverflow.com/questions/15585433/Jamnagar" parent_id="4893"/> <child_4903 entity_id="4903" value="http://stackoverflow.com/questions/15585433/Junagadh" parent_id="4893"/> <child_4904 entity_id="4904" value="http://stackoverflow.com/questions/15585433/Morvi" parent_id="4893"/> <child_4905 entity_id="4905" value="http://stackoverflow.com/questions/15585433/Nadiad" parent_id="4893"/> <child_4906 entity_id="4906" value="http://stackoverflow.com/questions/15585433/Navsari" parent_id="4893"/> <child_4907 entity_id="4907" value="http://stackoverflow.com/questions/15585433/Patan" parent_id="4893"/> <child_4908 entity_id="4908" value="http://stackoverflow.com/questions/15585433/Porbandar" parent_id="4893"/> <child_4909 entity_id="4909" value="http://stackoverflow.com/questions/15585433/Rajkot" parent_id="4893"/> <child_4910 entity_id="4910" value="http://stackoverflow.com/questions/15585433/Surat" parent_id="4893"/> <child_4911 entity_id="4911" value="http://stackoverflow.com/questions/15585433/Surendranagar" parent_id="4893"/> <child_4912 entity_id="4912" value="http://stackoverflow.com/questions/15585433/Vadodara (Baroda)" parent_id="4893"/> <child_4913 entity_id="4913" value="http://stackoverflow.com/questions/15585433/Vejalpur" parent_id="4893"/> <child_4914 entity_id="4914" value="http://stackoverflow.com/questions/15585433/Veraval" parent_id="4893"/> </child_4893></childrens>this is my product.xml file:-<products> <proddict_id value="http://stackoverflow.com/questions/15585433/1"> <tab_id> <tab_name value="http://stackoverflow.com/questions/15585433/test1" /> <dist_region value="http://stackoverflow.com/questions/15585433/4909"/> <dist_region value="http://stackoverflow.com/questions/15585433/4909"/> <dist_region value="http://stackoverflow.com/questions/15585433/4909"/> </tab_id> </proddict_id></products>in my general.xml file one node element <name> it store city name
if this city name is exit in region.xml file
then check there entity_id value if entity_id value is exit in product.xml file
then return o/p 1 this is product_id in product.xml file.
e.g:-in my general.xml <name>Rajkot</name>
then now check Rajkot is exit in my region.xml
if its true then check what is entity_id of them
entity_id in over region.xml 4909
if this is exit in product.xml then return product_id attribute value 1 thanks...
 
Back
Top