Jump to content
Bob Schor

Problem with Hash (#) in name

Recommended Posts

I have a cluster with an element called "Trial #". According to the "rules" of XML, all 7 characters are valid. According to the "rules" of EasyXML, the space character should be converted to an underscore. Thus I expect the EasyXML code to have a tag that looks like <Trial_#>, but instead, I get <Trial_>, missing the Hash character. I know that this character can have another meaning as a "numeric indicator", i.e. something like "Ӓ" (I think this form is called a numeric character reference, and I think this allows you, in XML, to "encode" any old character by writing its decimal value).

 

Is omitting the "#" in EasyXML a Bug or a Feature? [Haven't experimented with other characters, but have seen references here to the colon character -- is it Treasure Hunt time?]

Share this post


Link to post
Share on other sites
I have a cluster with an element called "Trial #". According to the "rules" of XML, all 7 characters are valid. According to the "rules" of EasyXML, the space character should be converted to an underscore. Thus I expect the EasyXML code to have a tag that looks like , but instead, I get , missing the Hash character. I know that this character can have another meaning as a "numeric indicator", i.e. something like "Ӓ" (I think this form is called a numeric character reference, and I think this allows you, in XML, to "encode" any old character by writing its decimal value).

 

Is omitting the "#" in EasyXML a Bug or a Feature? [Haven't experimented with other characters, but have seen references here to the colon character -- is it Treasure Hunt time?]

 

Hi Bob,

 

The # character cannot be used in XML names, according to the specification, here:

 

http://www.w3.org/TR/REC-xml/#sec-common-syn

 

As such, EasyXML will delete it from names.

 

Of course, interpreting the XML specification can be a bit of a "treasure hunt", unless you have a really good understanding of regular expressions :)

 

Thanks,

 

-Jim

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.