Hm, haven't tried this before - try this out:
var oNode = XDocument.selectSingleNode( "my:myFields/my:field1" );
var oMinOccurs = oNode.selectSingleNode( "@minOccurs" );
if( oMinOccurs.text == "1" )
{ /* node is required */ }
Also, if that doesn't work you could try using oNode.getAttribute( "@minOccurs" ). Like I said, I haven't tried this, but it seems like it should work.
---------------
Matt Faus
InfoPath Dev Texas
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge