vb.net - Comparing xml Attribute with String finds no match -
how can compare these 2 correctly
if xanswer.@state = "error" , xanswer.@errormsg = **"der wert darf nicht null sein.& #xd;
parametername: xmlstruct (attributes country)"** < response state="error" errormsg="der wert darf nicht null sein.
parametername: xmlstruct (attributes country)" xmlns=""></response >
i believe doesnt jump if path because of & #xd;

in xml attribute. means in xml attribute different in string. can approve this? tried replace & #xd;

in string & vbcrlf &
but didn't work
if xanswer.@state = "error" , xanswer.@errormsg = "der wert darf nicht null sein." , xanswer.errormsg.@parametername = " xmlstruct (attributes country)"
and
if xanswer.@state = "error" , xanswer.@errormsg = "der wert darf nicht null sein." , xanswer.@errormsg = "parametername: xmlstruct (attributes country)"
doesnt work.
as xml attributes strings used .contains method selection. thx first answer.
you can try using string functions startwith()
, endwith()
match xml element , skip checking & #xd;

part :
if xanswer.@state = "error" , _ xanswer.@errormsg.startswith("der wert darf nicht null sein.") , _ xanswer.@errormsg.endswith(" xmlstruct (attributes country)")
Comments
Post a Comment