PDA

View Full Version : QXmlResultItems wierd behavior



ixSci
21st August 2009, 12:23
Hi folks,

I have a simple XQuery
declare variable $InputDocument external; doc($InputDocument)/root/string(EnvelopeIcon) and an XML document which is just as complex
<?xml version="1.0"?><root><EnvelopeIcon>C:\ABC\ggg.jpg</EnvelopeIcon><RecordIcon>C:\ABC\SSS\111.jpg</RecordIcon></root>
Then I evaluate it to an QXmlResultItems instance and use its result via next() member-function. That's it. But when I call next() function one more time I have non-null element! And if I take its value it would empty string. I don't understand why I have two elements in QXmlResultItems instead of one.
P.S If i use
declare variable $InputDocument external; doc($InputDocument)/root/EnvelopeIcon I have right behavior with QXmlResultItems containing one element.
Is it bug? or I don't know something?