[xml] Need XML string to parse



Hi,
   I have a very serious query. Iam looking for a libxml function that can parse the XML string (not file) and validate it against the DTD file. I have searched in library, I have got many function like:
xmlDocPtr	xmlCtxtReadFile		(xmlParserCtxtPtr ctxt, 
const char * filename,
const char * encoding,
int options)
But they all take file name as input. I need function that take string as input for XML.

I know there is an alternate way i.e. to create a file and write the whole string to that file and then pass its name to the function. But it would degrade the performance of my application very much because of file I//O handling as I need to parse a number of XML strings against the DTD files.

Please show me the way as I am stuck because of this.


Make the world eco-friendly through MSN Green Drag n' drop


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