[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev@l...
  • Subject: Validate an XPath with regex
  • From: Niels Peter Strandberg <nielspeter@n...>
  • Date: Thu, 4 Apr 2002 10:30:33 +0200

Shouldn't it be possible to validate the syntax of an XPath string using 
regular expressions. Im not a regex expert, so just want to ask you out 
there if it could be done.

This is useful if you have a app that takes a XPath as argument, then 
you simply match the string against a regex to validate the syntax of 
the XPath string. This could also be used if you only support a subset 
of XPath in your app, by simply changing the regex!  When the string is 
validated, you can send the XPath to parsing.

Is the an regex expert, who want to gives this a try? I could try, but 
the result would not be pretty ;-)


Niels Peter


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member