.net - vb.net Xmldocument, selectSingleNode only returns value with vs2008 "watch" utility -


i have problem selectsinglenode function.

context: in program need perform subsequent filters, have no problems on those, time have weird "bug".

i have next code:

dim test xmlnode = parentxmlnode.selectsinglenode("day[@date='" & fecha.date.tostring("o") & "']" 


problem: when debug/run code above, variable "test" alwas have nothing, if apply "watch" on "selectsinglenode" instruction return xmlnode.

no matter if go , re-degug part of code, result same.

of course code above oversimplification of original code, here untouched original code causes problem:

edit : full code wasnt necessary, in fact make question hard read, error in line of code exposed before.

any information highly appreciated. in advance.

the error in "fecha.date.tostring("o")" part of code.

when use watch utility on part datetimekind.unspecified format of iso 8601 (2009-06-15t13:45:30.0000000)

but when code interpeted, program got datetimekind.utc format of iso 8601 (2009-06-15t13:45:30.0000000z)

i have discovered using , intermediate string variable store xpath filter. dont know why watch utility changes result, maybe has heisenberg's particle complex,

but correction using "datetime" intermediate variable specifically declared datetimekind utc:

solution:

dim fechaaux string = new datetime(fecha.ticks, datetimekind.unspecified).tostring("o") dim test xmlnode = parentxmlnode.selectsinglenode("day[@date='" & fechaaux.date.tostring("o") & "']" 

this stuff keept me delayed days, hope find question/answer useful.

best regards.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -