InfoPath is based on Extensible Markup Language (XML). When you design a form template, InfoPath creates an .xsn file, which is a cabinet (.cab) file that contains the files necessary for the form to function, such as XML Schema (XSD) and XSL Transformation (XSLT) files. When a user fills out a form in InfoPath, the data in that form is saved or submitted as industry-standard XML
MOSS has a great new feature that allows the publication of InfoPath forms to the server and thus enabling users that do not have InfoPath installed to fill in forms without having to distribute or purchase InfoPath for each client.
I needed to get the display name for the logged in user from active directory to populate a text box in an InfoPath form and went searching Google for an answer and finally I found some really complex resolutions that I didn't even want to attempt to deploy.
1. code approach
http://msdn.microsoft.com/en-us/library/bb952744(v=office.12).aspx
2.Without code approach
http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx
I can suggest you to go for 'without code' approach as it is very properly defined and easy to implement as i had used it many times without any issues...
Please check and let me know in case of any questions/queries...
I would be more than happy to resolves your issues regarding the same.... Thanks