The best method is use DTD in the file (see section 3.2 from the FAQ http://www.aleksey.com/xmlsec/faq.html From your program you can call xmlGetID/xmlAddID functions. But be aware that this document might not be verified by someone who would not make similar calls. Aleksey