Link to home
Start Free TrialLog in
Avatar of dylanone
dylanone

asked on

**HOW DOES XQUERY WORK**

How does XQUERY work - does one need special software or a module to make it run - I found an example and tried to run it in IE 5.5 as an xml file but it doesn't run (error is: Only one top level element is allowed in an XML document. Line 12, Position 2)  
<bib>

- the example looked like this:


<?xml version="1.0"?>

<bib>
     <book year="1994">
          <title>TCP/IP Illustrated</title>
     </book>
     <book year="1992">
          <title>Advanced Programming in the Unix environment</title>
     </book>
</bib>

<bib>
 {
  for $b in document("http://www.bn.com/bib.xml")/bib/book
  where $b/publisher = "Addison-Wesley" and $b/@year > 1991
  return
    <book year="{ $b/@year }">
     { $b/title }
    </book>
 }
</bib>
ASKER CERTIFIED SOLUTION
Avatar of hdane
hdane

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial