modifying xml file with VB
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.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Last Post: 01-10-2003, 09:39 PM
By Tim in forum xml.announcements
Last Post: 10-11-2001, 05:00 PM
Last Post: 08-23-2001, 05:47 PM
By Andrew McLellan in forum Java
Last Post: 05-09-2001, 06:34 PM
By Tim Frost in forum xml.announcements
Last Post: 04-02-2001, 11:53 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL