Jump to content

space in xml


newToXML

Recommended Posts

Hi All, I want to craete a tag in my xml file like <contents entry> I am using dom parser for craeting an xml.While craeting an xml i also involved xml:space ...but it dint turned out to be useful.I wanted to use preservewhitespace(true) ..but my my object of document doesnt show the option...Please help me out of this.Thanks in advance

Link to comment
Share on other sites

  • 1 month later...

Spaces (0x20) are illegal in XML names. :)

Link to comment
Share on other sites

You could do <contents_entry/> or <contents><entry/></contents>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...