อืม ขอบคุณคุณโจ้ อยากได้แบบ connect xml แล้วทำงานเหมือน DB เลยอ่ะ 555
หมายถึง XQuery หรือเปล่าครับ? ลองดูตัวนี้นะครับ
http://phpxmlclasses.sourceforge.net/xquery_lite.html 
Now we are going to show how some W3C Xquery Use-Cases can be solved using Xquery Lite
In the examples we will work with the "bib.xml" document which has information about books:
<bib>
<book year="1994">
<title>TCP/IP Illustrated</title>
<author><last>Stevens</last><first>W.</first></author>
<publisher>Addison-Wesley</publisher>
<price> 65.95</price>
</book>
<book year="1992">
<title>Advanced XML Programming in the Unix environment</title>
<author><last>Stevens</last><first>W.</first></author>
<publisher>Addison-Wesley</publisher>
<price>65.95</price>
</book>
<book year="2000">
<title>Data on the Web</title>
<author><last>Abiteboul</last><first>Serge</first></author>
<author><last>Buneman</last><first>Peter</first></author>
<author><last>Suciu</last><first>Dan</first></author>
<publisher>Morgan Kaufmann Publishers</publisher>
<price> 39.95</price>
</book>
<book year="1999">
<title>The Economics of Technology and Content for Digital TV</title>
<editor>
<last>Gerbarg</last><first>Darcy</first>
<affiliation>CITI</affiliation>
</editor>
<publisher>Kluwer Academic Publishers</publisher>
<price>129.95</price>
</book>
</bib>
Use-Case 1
<bib>
{
for $b in document("c:\apache\htdocs\phpxmlclasses\bib.xml")/bib/book
where $b/publisher = "Addison-Wesley" and $b/@year > 1991
return
<book year="{ $b/@year }">
{ $b/title }
</book>
}
</bib>
Comment: we retrieve all book elements using a for statement and filter by the name of the published and the year attribute (note the element/@name notation). The return just builds an XML document listing the year as an attribute and the title of the books that match the criteria.
The result will be something like this:
<bib>
<book year="1994">
<title>TCP/IP Illustrated</title>
</book>
<book year="1992">
<title>Advanced XML Programming in the Unix environment</title>
</book>
</bib>
อันนี้เหมาะกับการจัดการ xml --> xml นะครับ ถ้าต้องการ xml --> data คงต้องทำตามที่คุณ EThaiZone แนะนำครับผม