fixing up a string to make it a valid XML attribute name ...

  • Thread starter Thread starter emma_middlebrook
  • Start date Start date
E

emma_middlebrook

Hi

Goal: trying to validate a string to see if it can be a valid XML
attribute name and, if not, replace any of the invalid characters with
an underscore (to fix it up).

Is there anything in the dot net framework to help with this? If not,
I'm guessing writing a regular expression is the way forward.

The specification is 2.3 Common Syntactic Constructs at
http://www.w3.org/TR/xml/ .

If I do write a regular expression will I really have to write one to
cover all those entries in e.g. CombiningChar!?!?!

Thinking my approach is wrong and time-consuming. Am I on the right
track or can someone advise me of a better way?

Thanks!

Emma
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top