If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

modifying xml file with VB

Hello all,
I am new with VB and xml. What I am trying to do is replacing a specific tag name in a xml file. I read in the file line by line with this statement:
strXML = objFile.ReadLine
but it returned to me was more than 1 line. was this a correct command to use for xml file? thanks.

ReadLine only returns a single line, that is, a string of characters terminated by carriage-return/line-feed. I suspect that your XML file doesn't have line breaks where you think it does.

In any case, it shouldn't matter whether you replace tags on a single line or multiple lines. Simply use ReadLine as you are doing, then use the Replace function to replace the tag names in the strXML variable.