Emptiness of XmlReader

Discussion in 'ASP .Net' started by Han, Jan 14, 2007.

  1. Han

    Han Guest

    Hello

    How do you know the emptiness of XmlReader? Example,

    xmlreader xr=command.executeXmlReader()

    Now if there is no data retrieved from SQL Server, the xmlReader may be
    empty or something.

    if (! xr.eof)
    if (xr != null)

    None worked. All I found to now is,

    xr.moveToContent()
    then,
    if (! xr.eof)

    That seems to work. However I believe there is a better way to find the
    emptiness of the XmlReader.
     
    Han, Jan 14, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    XMLReader or XMLDocument ?

    Guest, Dec 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    949
    Michel
    Dec 24, 2003
  2. George Durzi

    DataSet into XmlReader

    George Durzi, Dec 31, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    7,430
    Patrick Steele [MVP]
    Dec 31, 2003
  3. =?Utf-8?B?TGFMYUJveQ==?=

    XmlReader Problem

    =?Utf-8?B?TGFMYUJveQ==?=, May 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    516
    =?Utf-8?B?SmFrb2IgQ2hyaXN0ZW5zZW4=?=
    May 13, 2004
  4. terrorix
    Replies:
    0
    Views:
    622
    terrorix
    Jun 9, 2004
  5. wapsiii

    Read xml string into XmlReader

    wapsiii, Feb 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    87,446
    wapsiii
    Feb 1, 2006
  6. curwen

    sax xmlreader.parse problem

    curwen, Nov 10, 2003, in forum: Java
    Replies:
    4
    Views:
    3,314
    curwen
    Nov 11, 2003
  7. Jeff Calico
    Replies:
    2
    Views:
    1,340
    Joseph Kesselman
    Feb 22, 2006
  8. Filip Gruszczyński

    Pythonic emptiness checking

    Filip Gruszczyński, Apr 29, 2009, in forum: Python
    Replies:
    6
    Views:
    606
Loading...