Parsing xml/html like text file with VBA macro



I have some raw data output in a text file from a program that I need to store and then format. The file output looks as such:



<Request><code_set>1604</code_set><start_code_value>-1</start_code_value><block_size>10000</block_size><ignore_access_ind>0</ignore_access_ind></Request>


All of the data is stored in Request or Reply block


All data is on a single row of the text file


Each request/reply block has many sub blocks - this is conditional; there could be 1, there could be 1,000


The data within the block is also conditional - there may be data and there may not be


I need to parse this out so in column A of an excel sheet it reads the name of the sub-block and column B has the data (if any).


No comments:

Post a Comment