vb.net - .NET XML Node Self Closing Tag -


i have piece of xml contains self closing tag follows:

    <givennode />     <givennode>this has data in it</givennode> 

how test if "givennode" empty?

    if not objchildnode.selectsinglenode("givennode").value nothing                         'do or other     end if 

this returns false either way, know must pretty easy cant figure out. rather not have change either code using @ moment of xmlfile can if have to.

thanks help.

if else has same problem me got around using following code

     if not objchildnode.selectsinglenode("givennode").innertext = string.empty                         //do or other       end if 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -