[xml] assigning attribute value without using



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




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