Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - how to get closing tag [Thread Next] Re: how to get closing tagTo: NULL Date: 2/6/2008 3:13:00 PM
Imran wrote:
> when i use DOM to generate the XML file ,what i get for a tag is as follows
>
> <MYTAG ATT="Hello"/>
>
> but what I want it
>
>
>
> <MYTAG ATT="Hello"> </MYTAG>
In your case the MYTAG element has as its content a text with a space
character. If you really want that then insert the contents e.g.
myTagElement.appendChild(xmlDocumentInstance.createTextNode(" "))
If you meant
<MYTAG ATT="Hello"></MYTAG>
instead then, in case your are using the .NET DOM implementation, there
is a property IsEmpty
<URL:http://msdn2.microsoft.com/en-us/library/system.xml.xmlelement.isempty.aspx>
that you can set to false.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
