tags:

views:

4246

answers:

4

How to represent space and tab in XML tag. Is there any special characters for them to represent.

+2  A: 

I think you could use an actual space or tab directly in XML document, but if you are looking for special characters to represent them so that text processors can't mess them up, then it's:

space =  
tab   = 	
galets
+1  A: 

Look at CDATA section.

http://www.w3schools.com/XML/xml_cdata.asp

shahkalpesh
+2  A: 

You cannot have spaces and tabs in the tag (i.e., name) of an XML elements, see the specs: http://www.w3.org/TR/REC-xml/#NT-STag. Beside alphanumeric characters, colon, underscore, dash and dot characters are allowed in a name, and the first letter cannot be a dash or a dot. Certain unicode characters are also permitted, without actually double-checking, I'd say that these are international letters.

David Hanak
+1  A: 

If you are talking about the issue where multiple and non-space whitespace characters are stripped specifically from attribute values, then yes, encoding them as character references such as 	 will fix it.

bobince