"Re: [xml] assigning attribute value without using (xmlNodeSetContent)"



Hi,

Sorry me, I just forgot to add the "xmlNodeSetContent" function to the 
subject of the previous mail.

on 3/29/2004 1:04 PM Kasimier Buchcik wrote:

Hi,

Is it sane to use "xmlAddChild((xmlNodePtr)attr, 
xmlNewDocText(attr->doc, BAD_CAST "&ent1;")" instead of 
"xmlNodeSetContent" if assigning a value to an attribute node?

The intention is to reflect the DOM Attr.value method:
"On setting, this creates a Text node with the unparsed contents of the 
string, i.e. any characters that an XML processor would recognize as 
markup are instead treated as literal text."

I tried serialization and it worked fine.

Does anyone see any side effects?


Regards,

Kasimier

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml




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