[libxml2] Clarify xmlNewDocProp documentation



commit ad101bb5b59c48a04ced94eec918896be47c1861
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Mar 2 13:32:53 2021 +0100

    Clarify xmlNewDocProp documentation

 tree.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/tree.c b/tree.c
index 17db4452..dbc87aa7 100644
--- a/tree.c
+++ b/tree.c
@@ -2020,6 +2020,11 @@ xmlNewNsPropEatName(xmlNodePtr node, xmlNsPtr ns, xmlChar *name,
  * @value:  the value of the attribute
  *
  * Create a new property carried by a document.
+ * NOTE: @value is supposed to be a piece of XML CDATA, so it allows entity
+ *       references, but XML special chars need to be escaped first by using
+ *       xmlEncodeEntitiesReentrant(). Use xmlNewProp() if you don't need
+ *       entities support.
+ *
  * Returns a pointer to the attribute
  */
 xmlAttrPtr


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