<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think this is a <b class="">bug</b> of parse-xml-fragment() since the string passed in $feed is a wellformed escaped xml fragment. <div class="">The xQuery-processor is trying to replace &amp; by & which makes no sense and produces like that an error ;-(<br class=""><div class=""><br class=""></div><div class="">What do the experts say ?</div><div class=""><br class=""></div><div class="">Blessings</div><div class="">Leo</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 21.06.2015, at 20:22, Leo Studer <<a href="mailto:leo.studer@varioweb.ch" class="">leo.studer@varioweb.ch</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Yes, $feed contains the expected info, no namespace issue hereā€¦</div><div class=""><br class=""></div><div class="">Try it out. </div><div class="">BaseX does not report an error however the code does not work and Saxon reports</div><div class=""><div class=""><br class=""></div><div class="">Engine name: Saxon-PE XQuery 9.6.0.5</div><div class="">Severity: fatal</div><div class="">Description: FODC0006: First argument to parse-xml-fragment() is not a well-formed and namespace-well-formed XML fragment. XML parser reported: org.xml.sax.SAXParseException: The reference to entity "service" must end with the ';' delimiter.</div><div class=""><br class=""></div></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 21.06.2015, at 19:10, Dannes Wessels <<a href="mailto:dannes@exist-db.org" class="">dannes@exist-db.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Does the doc()//item/... expression return anything? I expect a namespace issue here...</div><div class=""><br class=""></div><div class="">Cheers</div><div class=""><br class=""></div><div class="">Dannes</div><div class=""><br class=""><br class="">--<div class=""><a href="http://www.exist-db.org/" class="">www.exist-db.org</a></div></div><div class=""><br class="">On 21 Jun 2015, at 17:15, Leo Studer <<a href="mailto:leo.studer@varioweb.ch" class="">leo.studer@varioweb.ch</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class="">Hello<div class=""><br class=""></div><div class="">I tried the following</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; color: rgb(66, 72, 167);" class=""><span style="color: #00a7d2" class=""><b class="">declare variable </b></span><span style="color: #a84ba7" class=""><b class="">$feed</b></span><span style="" class=""> </span><span style="color: #8b8900" class="">:=</span><span style="" class=""> </span><span style="color: #004f00" class=""><i class="">doc</i></span><span style="" class="">(</span>"<a href="http://www.meteotest.ch/meteotest-extras/rss/rss-sio.xml" class="">http://www.meteotest.ch/meteotest-extras/rss/rss-sio.xml</a>"<span style="" class="">)</span><span style="color: #8b8900" class="">//</span><span style="color: #042eeb" class=""><b class="">item</b></span><span style="color: #8b8900" class="">/</span><span style="color: #042eeb" class=""><b class="">description</b></span><span style="color: #8b8900" class="">/</span><span style="color: #004f00" class=""><i class="">string</i></span><span style="" class="">()</span><span style="color: #8b8900" class="">;</span></div><div style="margin: 0px;" class=""><font color="#8b8900" class=""><br class=""></font></div><div style="margin: 0px;" class=""><div style="margin: 0px; color: rgb(4, 46, 235);" class=""><html><span style="" class=""><br class="">
</span><body><span style="" class="">{<br class="">
</span><span style="color: #004f00" class=""><i class="">parse-xml-fragment</i></span><span style="" class="">(</span><span style="color: #a84ba7" class=""><b class="">$feed</b></span><span style="" class="">)</span><span style="color: #8b8900" class="">/*</span><span style="" class="">}<br class="">
</span></body><span style="" class=""><br class="">
</span></html></div><div style="margin: 0px; color: rgb(4, 46, 235);" class=""><br class=""></div><div style="margin: 0px; color: rgb(4, 46, 235);" class=""><span style="color: rgb(66, 72, 167);" class="">to use the weather infos from this feed.</span></div><div style="margin: 0px; color: rgb(4, 46, 235);" class=""><span style="color: rgb(66, 72, 167);" class="">Unfortunately </span><span style="color: rgb(0, 79, 0);" class=""><i class="">parse-xml-fragment</i></span>(<span style="color: rgb(168, 75, 167);" class=""><b class="">$feed</b></span>) does not work since & is used in a URL. Is there a easy way to do that?</div></div></div><div class=""><br class=""></div><div class="">Thanks in advance</div><div class="">Leo</div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class=""><a href="mailto:talk@x-query.com" class="">talk@x-query.com</a></span><br class=""><span class=""><a href="http://x-query.com/mailman/listinfo/talk" class="">http://x-query.com/mailman/listinfo/talk</a></span></div></blockquote></div>_______________________________________________<br class=""><a href="mailto:talk@x-query.com" class="">talk@x-query.com</a><br class=""><a href="http://x-query.com/mailman/listinfo/talk" class="">http://x-query.com/mailman/listinfo/talk</a></div></blockquote></div><br class=""></div>_______________________________________________<br class=""><a href="mailto:talk@x-query.com" class="">talk@x-query.com</a><br class="">http://x-query.com/mailman/listinfo/talk</div></blockquote></div><br class=""></div></div></body></html>