[xml] validating node attributes against a DTD




I need to remove invalid attributes from my XML tree and would like to
use the following function:
 
int xmlValidateAttributeDecl (xmlValidCtxtPtr ctxt, 
xmlDocPtr doc, 
xmlAttributePtr attr)
 
 
I have the xmlValidCtxtPtr, xmlDocPtr, and an xmlNodePtr at my disposal.
I would like to iterate through the list of xmlAttrPtrs provided by the
xmlNodePtr, and run xmlValidateAttributeDecl on each attribute so that I
can remove any invalid attributes I come across.  
 
Is there an easy way of obtaining an xmlAttributePtr so that I could use
the xmlValidateAttributeDecl function?
 
Thanks,
Dan




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