Re: [xml] Self terminating tags

On Thu, Dec 12, 2002 at 07:39:48AM -0800, Brett Robichaud wrote:
I was talking about simple output from libXML.  If I add a new empty tag
using xmlNewTextChild() it is saved as <tag></tag> NOT as <tag/>.  I would
like the latter.

  If you pass an empty string you ask for the creation of a node with a 
text child. If the string is empty, the text node is created anyway.
And the <tag></tag> serialization for such an internal structure may
make sense too. If the string is empty simply create an empty new node
with xmlNewNode(). 
  You asked for that empty string, you get it. Period.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]