Writing a particular name from a file to another file - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Writing a particular name from a file to another file (/Thread-Writing-a-particular-name-from-a-file-to-another-file) |
Writing a particular name from a file to another file - zealdeep - 11-17-2009 Hi, I need some help for reading from a text file, and writing a specific data starting with an element into another Text file I tried with following code and the code is asfollows Code: Option Explicit Actually i need to open a .xml file and note all the specific name starting with Name"xyz.xml", which has a list of xml names from line 2 to end of the file,which is arounf 70 character in a line so i wondering how to capture only the name of the .xml file RE: Writing a particular name from a file to another file - Saket - 11-17-2009 the objective is not clear, exactly what values you are trying to extract from the xml file. you can use XMLUtil or MSXML instead of Filesystemobject for reading a xml doc. or else if you can paste the piece of your xml structure with more explanation of what are you trying to extract, will help. RE: Writing a particular name from a file to another file - zealdeep - 11-18-2009 the data in xml file from which i need to read data is in the below form Code: <manifest docCount="00005" datauri="data/ABC_XYZ.DOCS" db="ASDF" triggersuffix="POP.1289"> now i will have to just read the name in each line i.e. XYZ-1234.xml, and write in another file. I tried from the below code Code: Option Explicit I am looking for considering from the name element, like the xml file name (XYZ-1234.xml) should only be considered as the no. of digits in homecsi may vary from 3 to 5 digits, so could you please suggest me something where i can just consider the filename, and not the count from each line Thanks Deepak RE: Writing a particular name from a file to another file - Saket - 11-18-2009 Have you tried using XMLUtil or MSXML to read your xml file? search this forum for info on this. RE: Writing a particular name from a file to another file - pavansri - 11-19-2009 following script should solve your problem Code: Option Explicit RE: Writing a particular name from a file to another file - zealdeep - 11-21-2009 I got it resolved, Thanku Pavansri RE: Writing a particular name from a file to another file - pavansri - 11-23-2009 Most Welcome |