>Please tell me how to covert an XML file into binary format after reading from disc
Actually, an XML file is in a binary format already. Presumably you want a different binary format. What kind of binary format did you have in mind?
>Please write code if possible.
You're joking, I assume. Giving free advice is one thing, unpaid coding is another.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference