Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using query in XML file

Status
Not open for further replies.

aa1232

Programmer
Oct 25, 2006
2
GB
Hi Folks,

Is it possible to use "select field from table where field = @par" in XML in order to populate my dropdown control. I have an xml file (below) i want to use select query to select test_name where Product_name = something. is it possible.


<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<XML_TEST_NAME>
<PRODUCT_NAME>ALx</PRODUCT_NAME>
<TEST_NAME>NBQ SEx</TEST_NAME>
</XML_TEST_NAME>
<XML_TEST_NAME>
<PRODUCT_NAME>ALxxA</PRODUCT_NAME>
<TEST_NAME>NBQ SExxxA</TEST_NAME>
</XML_TEST_NAME>
</NewDataSet>
 
[tt]let $doc:=doc("[green]pathtoyoursourc.xml[/green]")
for $v in $doc//XML_TEST_NAME
where $v/PRODUCT_NAME="ALxxA"
return data($v/TEST_NAME)
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top