Link to home
Start Free TrialLog in
Avatar of e_murf1
e_murf1

asked on

Need help with storing RegEx in XML

Hi,
 I need to store some regular expressions in an XML but the special characters appear to be causing problems. I read somewhere that if I convert them to hex it works ok but I'd prefer to store them as they are. Does anyone know how I can get around this?

<RegularExpressions>
      <TEST>
            <Node><(?<tag>TEST)>(?<text>.*)</\k<tag>></Node>
            <Node><(?<tag>TESTA)>(?<text>.*)</\k<tag>></Node>
      </TEST>
</RegularExpressions>

        'load the xml file
        xd.Load(Application.StartupPath & "\RegularExpressions.xml")
        Dim Node As XmlNode
        Dim ChildNode As XmlNode

        Node = xd.SelectSingleNode("//TEST")
        For Each ChildNode In Node
            MsgBox(ChildNode.InnerXml)
        Next
ASKER CERTIFIED SOLUTION
Avatar of Jason Evans
Jason Evans
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of e_murf1
e_murf1

ASKER

That worked perfectly. Thanks for the help.
Eoghan.