# XML tag naming

**URL:** <https://forum.kirupa.com/t/xml-tag-naming/325392>\
**Category:** programming\
**Created:** [October 12, 2011, 10:25pm UTC](https://forum.kirupa.com/t/xml-tag-naming/325392 "2011-10-12T22:25:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewlong](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@andrewlong](https://forum.kirupa.com/u/andrewlong)\
**Post date:** [October 12, 2011, 10:25pm UTC](https://forum.kirupa.com/t/xml-tag-naming/325392/1 "2011-10-12T22:25:08Z")

</div>

Every website I find gives these rules for naming XML elements:  
[LIST]  
[_]Names can contain letters, numbers, and other characters  
[_]Names must not start with a number or punctuation character  
[_]Names must not start with the letters xml (or XML, or Xml, etc)  
[_]Names cannot contain spaces  
[/LIST][FONT=inherit]However, no where in that list does it say you cannot use forward or back slashes, which cause errors. I have seen sites say to avoid periods, hyphens, etc. as some software doesn’t parse them correctly. I’ve never had a problem with periods, but have with hyphens, so I am wondering, for php (specifically using the SimpleXMLElement class) is there a list of characters to be avoided (for instance would an asterick work)?[/FONT]
