Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi

 

I have converted the data in the dataset into xml file. then i am trying to search a word (text1.value) in the xml file by the following statement in loop which increment i & j

 

myxml.Document.DocumentElement.ChildNodes.Item(i).ChildNodes.Item(j).InnerText.IndexOf(Text1.Value)

 

But it gives me an error

Object reference not set to an instance of an object

 

When i use actual integer values like 1,2 instead of the variables i & j .i.e ITEM(1) instead of ITEM(j) in the above statement....am able to get the result.

 

how should i fix this problem

 

thanks

Posted
It would be better if you post how you fixed it, so that other users on the site can benefit from what you have done...
Dream as if you'll live forever, live as if you'll die today

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...