modifying xml file with VB

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: modifying xml file with VB

  1. #1
    Join Date
    Jul 2005

    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.


  2. #2
    Join Date
    Nov 2003
    Portland, OR
    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.
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Why use XML?
    By Brian in forum XML
    Replies: 5
    Last Post: 01-10-2003, 08:39 PM
  2. Try XML Junction
    By Tim in forum xml.announcements
    Replies: 0
    Last Post: 10-11-2001, 04:00 PM
  3. XML from Mainframe flat file
    By Gee in forum XML
    Replies: 11
    Last Post: 08-23-2001, 04:47 PM
  4. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 05:34 PM
  5. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center