View Source XMLRPC.Encode (XMLRPC v1.4.3)

Utility functions helpful for encoding XML.

Summary

Functions

Escape special characters in XML attributes.

Wrap a value in an XML tag.

Functions

escape_attr(string)

Escape special characters in XML attributes.

Note: technically you only need to escape "&" and "<" in tags, however, its common to also escape ">". For attributes you must additionally escape both single and double quotes, but its convenient to also escape and

tag(tag, value)

Wrap a value in an XML tag.

Note: For xml-rpc we need only a very minimal XML generator.