2010-03-05 5 views
1

Comment charger un document xml avec xquery pour être analysé par le processeur XQIB intégré au navigateur IE. Notez que doc ("doc.xml") n'est pas pris en charge pour l'utilisation avec XQIB Processor.XQUERY Charger XML à traiter par XQIB

+0

Parce que c'est une question spécifique à propos du moteur XQIB XQuery, j'ai rediffusé en conséquence –

Répondre

1

Je n'ai aucune expérience avec XQIB, mais je ne trouve ceci:

http://www.systems.ethz.ch/education/courses/hs09/xml-and-databases/project/xqib-doc.pdf 

Navigating other Web sources 
The doc function is not supported by XQIB. Instead, to query other sources from the 
Web, you should use the Zorba REST library (Zorba is the XQuery engine used by the 
plugin). This API is documented at 

http://www.zorba-xquery.com/doc/zorba-latest/zorba/html/rest.html 

For example: 

<html> 
    <head>  
    <script type="text/xquery"> 
     declare namespace zorba-rest 
     = "http://www.zorba-xquery.com/zorba/rest-functions"; 
     declare sequential function local:main() { 
     browser:alert( 
      (zorba-rest:get( 
       "http://www.inf.ethz.ch/rss/events.xml" 
      )//*:item/*:title/data(.) 
     )[1] 
     ) 
     }; 
    </script> 
    </head> 
    <body> 
    <h1>Hello world page.</h1> 
    </body> 
</html> 

Note that since XHTML is the default namespace, you need to use the joker (*) symbol 
to access elements which are in no namespace (it actually selects all possible 
namespaces). Unfortunately, there is no other known workaround about this in XQuery. 
+0

Merci! Ma première réponse acceptée! – philcolbourn

0

Juste une remarque: la fonction doc a été mis en œuvre.

Questions connexes