Project

Profile

Help

finding out if result is empty

Added by Anonymous over 19 years ago

Legacy ID: #2860686 Legacy Poster: Francis Upton (francisu)

I have a situation where I run XQuery and use either StreamResult or SAXResult (as specified by the caller to my application), and I would like an easy way to determine if the transformation produced no output. Obviously, I can put something in front of each of these Result objects to detect this, but I'm wondering if there is an easier way. Thanks, Francis


Replies (1)

RE: finding out if result is empty - Added by Anonymous over 19 years ago

Legacy ID: #2860950 Legacy Poster: Michael Kay (mhkay)

I would recommend using the run() method with a StreamResult or SAXResult only for queries that produce a well-formed XML document as their result. If the result is XML, then of course you can find out anything you need to know about it using another query. Apart from that, I'm really not sure what you had in mind. Michael Kay

    (1-1/1)

    Please register to reply