<([^/> ]+)\s*([^>])\s(?:/>|>(.*)</\1>) - (with global) finds all tags in scope
1st group is tagname 2nd group is attributes 3rd group (if it exists) is value of the tag
Apply pattern again on 3th group to find internal tags (recurse in the code to parse entire xml!)
Apply pattern below on 2nd group to find all attributes:
\s+([^<>=" ]+)\s*=\s*"([^"]*)" - (with global) finds attributes
1st group is attributename
2nd group is attributevalue