I am using the SAX interface of libXML to write a XML parser application in C++.
<abc value="xyz "pqr""/>
how do I parse this attribute?
I tried using
void startElementNsSAX2Func(void * ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar ** namespaces, int nb_attributes, int nb_defaulted, const xmlChar ** attributes)
, incrementing attributes parameter( and checking for a " to indicate the end of the attribute value).
It works for all the attributes other than *"*
appearing in the attribute value.
What is the right method to parse these kind of attribute values?
Thanks
try this function:
YOu can use it like this: