Parsing strings of text between xml tag identifiers

CharlieWh

New member
Local time
Today, 07:00
Joined
Oct 12, 2014
Messages
4
I have a Db with a table imported from sql server. One of the fields contains data wrapped between xml tags. The xml tag identifiers when looked at as columns are not consistently the same tag identifiers but effectively I am parsing the string to provide columns of data from between the tag identifiers.

example:

<T6><A29>Compton Group</A29><A31>CO009</A31><A32>CO161/71</A32><A30>Invu Proposal</A30><A28>05 September 2007</A28><A41>Sales</A41></T6>

I am wondering if the method I am using to deconcatenate the string is the bext way.

In my query I reference the left tag value
TagVal1: ParseTagOpenVal([Attributes],3)
And then I parse the result based on the right hand tag value
Val1: ParseTagCloseVal([TagVal1],1)

I have a couple of modules for parsing the string and I am able to deconcatenate using this method but I am wondering if its the only way or the most efficient?
 
I am not sure you can use it but access has an xml parser built in.
It requires the right reference to be activated but once done it works fine.
What you are looking for has to do with either childnodes or attribute value if I remember correctly.

I don't have any examples as I am struggling to make sense of it myself.

another option is to shoot it into a file and let excel read it. for some reason excel handles it quite easily. you can then take your data from the excel file.
 

Users who are viewing this thread

Back
Top Bottom