[xml] escaping and unescaping

Date view Thread view Subject view Author view

From: David Helder (dhelder@umich.edu)
Date: Sun Dec 05 1999 - 18:31:40 EST


I want to make a node like this:
  <topic name="software & hardware">
by doing this:
  xmlSetProp(topic_node, "name", "software & hardware");

But libxml complains of an unterminated entity because of the &. From
looking at the documentation, I think I need to use
xmlEncodeEntitiesReentrant, which will convert the & to something. Is
this right? How do I decode it? Thanks!

David

---
      __          _    __ 
  ___/ /__ __  __(_)__/ /  David Helder - University of Michigan
 / _  / _ `/ |/ / / _  /   dhelder@umich.edu
 |_,_/|_,_/|___/_/|_,_/    http://www.eecs.umich.edu/~dhelder

---- Message from the list xml@rufus.w3.org Archived at : http://rufus.w3.org/veillard/XML/messages to unsubscribe: echo "unsubscribe xml" | mail majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:53 EDT