Hello,
Yes you can query both structured data as well as XML data by using some methods like Nodes, Query in SQl XMl.
You may also want to look into this link below.
http://msdn2.microsoft.com/en-us/library/ms203812.aspx
and an example in the link below.
http://www.sitepoint.com/article/data-as-xml-sql-server
Kalyan G Reddy
Infopath MVP 2007 and 2008