XML is not a regular language (please note that "regular" has a specific meaning with regard to a language; look it up if you do not know what this means). Therefore, you cannot generally parse it with a regular expression.
Take an XML library that fits your need. Here are some descriptions of such.
In reply to Re^3: Search and replace over line break
by Svante
in thread Search and replace over line break
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |