[Home] [By Thread] [By Date] [Recent Entries]


Rick Marshall wrote:

>so is there a simple, open source api, that can be used to
>
>1. print an xml compliant cdata section
>2. print an xml compliant tag
>
>????
>
>that's all many of us need
>  
>
hi

answering directly your question: i am sure that there are many and for 
one example of such API take a look on XmlPull.org.
for 1. check method cdsect() and for 2. see tag()/attribute() methods in 
XmlSerializer, for more details see and check samples:
http://www.xmlpull.org/v1/doc/api/org/xmlpull/v1/XmlSerializer.html

this API is focused on high performance lower level support for XML 
streaming  of XML infoset and as it focuses on streaming so it requires 
input to be *already* valid infoset to have best performance possible 
when writing XML that is just passed through and is valid XML (AFAIR in 
this API only attribute() and text() methods are required to do escaping 
as text input may contain so you will need to check how escaping  in 
cdsect() method is working for given implementation of API (in XPP3 
cdsect() argument is not checked for correctness or escaped and anyway 
CDATA is not part of XML Infoset ...).
.
HTH

alek


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member