単純なはずのMonodroidコードには苦労していますが、予期しない例外が発生しています。 XmlDocumentオブジェクトでSelectNodes()を呼び出そうとすると、コードが例外をスローします。Monodroid:XmlDocument.SelectNodes()メソッドの例外
これはコードである:
のXmlDocument handXmlDocument =新規のXmlDocument()。
XmlDeclaration dec = handXmlDocument.CreateXmlDeclaration( "1.0"、null、null);
handXmlDocument.AppendChild(dec);
XmlElement root = handXmlDocument.CreateElement( "friendslist");
handXmlDocument.AppendChild(root);
XmlElement friendElement = handXmlDocument.CreateElement( "friend");
friendElement.SetAttribute( "locationx"、 "35");
friendElement.SetAttribute( "locationy"、 "46");
friendElement.SetAttribute( "phone"、 "4085556803");
root.AppendChild(friendElement);
XmlNodeList friendNodeList = handXmlDocument.SelectNodes( "/ friendslist/friend");
、ここでは例外である:
E /モノ(365):[0x45eec0:】例外処理:System.TypeInitializationException:例外がSystem.Console E/FriendsViewのタイプ初期化子によってスローされた(365 )例外XMLドキュメントの解析:System.Consoleの型初期化子によって例外がスローされました E/FriendsView(365):XMLドキュメントを解析する内部例外:System.ExecutionEngineException:SIGILL E/FriendsView(365):at System.Console ..cctor()[0x00019] /Users/plasma/Work/mono-android-trunk/mcs/class/corlib/System/Console.cs:127
1時間なぜSystem.Consoleがここに関わっているのか分かりません!助けてくれてありがとう、マーティン
製品はベータ版ですので、メーリングリストやMonodroidバグトラッカーにバグを報告してください。 – leppie