?
Solved

**HOW DOES XQUERY WORK**

Posted on 2003-03-05
1
Medium Priority
?
249 Views
Last Modified: 2008-02-26
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>
0
Comment
Question by:dylanone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
hdane earned 800 total points
ID: 8078232
The error arises becouse yoou have two top level elements <bib>. One for the XML, other for the query.
XQuery have to be executed on a XQuerz processor. Here is one to try http://www.cogneticsystems.com/xquery/xquery.html.
I don't think that IE 5.5 has one implemented.
0

Featured Post

How to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question