the data can easily be modeled in the relational database. and that's how I had had it. But, if I do this it requires a number of extra trips to the database. If I could parse this I could reduce the number of trips to and from the DB to 3 - with a separate trip to the DB to get these variables it will require up to 15 trips for displaying just one page (which will substantially slow things down compared to the 3 trips). the thing is that most attributes only have one variable. or value, so my query has only the attribute_id and the value returned. For example, in my contacts database, if it asks what gender you are it returns either male of female. However, things like addresses are more complex, and have multiple fields. thus if i get all the answers in a query where one column stays the attribute_id and the other the value i won't work for those - multi-value attributes... i don't know if this is making any sense to any of you ... i think i'll dicuss this in detail with the people i will be developing this contacts app with - it would take too explain the exact reasoning... other than to say that to make it work would improve performance substantially. Ill take a look at ns_xml and tDom - i haven't used it yet and guess i should learn about them. I figured my regexp would work.
So Ill take Alfred's suggestion: does anybody know of the correct this regexp?