java xml, create self closing tag -


i'm using xerces xml library in java.

i'm able create element like:

element myelement = doc.createelement("element");

which result in <element></element>.

how create element result in self closing tag so?

<element/>

thanks.


Comments

Popular posts from this blog

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -

c# - Pausing a storyboard on TabItem mouse over -

c# - Attribute value in root node of xml Linq to XML -