Mikami_Teru
New Member
I have the unsolved issue on my last questions on Get Element Filtering by Attribute, this is the following XML: <?xml version="1.0" encoding="utf-8"?><assertions> <assertion id="SLM_CekNonNegative"> <satisfied count="36"/> <unsatisfied count="4"> <message xml:lang="id">(Record ID = ID_2) SLM: Jumlah bulan lalu, jumlah bulan laporan, jumlah hari tunggakan, dan jumlah tunggakan pokok tidak boleh kosong dan harus diisi >= 0</message> <message xml:lang="id">(Record ID = ID_2) SLM: Jumlah bulan lalu, jumlah bulan laporan, jumlah hari tunggakan, dan jumlah tunggakan pokok tidak boleh kosong dan harus diisi >= 0</message> <message xml:lang="id">(Record ID = ID_2) SLM: Jumlah bulan lalu, jumlah bulan laporan, jumlah hari tunggakan, dan jumlah tunggakan pokok tidak boleh kosong dan harus diisi >= 0</message> <message xml:lang="id">(Record ID = ID_2) SLM: Jumlah bulan lalu, jumlah bulan laporan, jumlah hari tunggakan, dan jumlah tunggakan pokok tidak boleh kosong dan harus diisi >= 0</message> </unsatisfied> </assertion> <assertion id="Base_CekJangkaWaktuMulaiLebihMudaJatuhTempo"> <satisfied count="10"/> <unsatisfied count="0"/> </assertion> <assertion id="SLM_CekJumlahBulanKrgDrNilaiKontrak"> <satisfied count="10"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekTanggalLebihMudaTanggalPelaporan"> <satisfied count="10"/> <unsatisfied count="0"/> </assertion> <assertion id="SLM_CekNilaiKontrak"> <satisfied count="2"/> <unsatisfied count="8"> <message xml:lang="id">(Record ID = ID_10) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_9) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_8) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_7) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_6) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_5) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_2) Nilai kontrak harus > 0</message> <message xml:lang="id">(Record ID = ID_1) Nilai kontrak harus > 0</message> </unsatisfied> </assertion> <assertion id="SLM_CekGolNasabah"> <satisfied count="9"/> <unsatisfied count="1"> <message xml:lang="id">(Record ID = ID_2) Golongan nasabah tidak boleh diisi sandi bank pelapor sendiri</message> </unsatisfied> </assertion> <assertion id="BS-IF_CekSLMVls"> <satisfied count="1"/> <unsatisfied count="0"/> </assertion> <assertion id="BS-IF_CekSLMIDR"> <satisfied count="1"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekHubunganTidakTerkaitStatusLainnya"> <satisfied count="8"/> <unsatisfied count="2"> <message xml:lang="id">(Record ID = ID_3) Base: "Status hubungan dengan Bank" harus terisi sandi 9 jika Kolom "Klasifikasi Nasabah - Hubungan dengan bank" terisi sandi 2</message> <message xml:lang="id">(Record ID = ID_2) Base: "Status hubungan dengan Bank" harus terisi sandi 9 jika Kolom "Klasifikasi Nasabah - Hubungan dengan bank" terisi sandi 2</message> </unsatisfied> </assertion> <assertion id="Base_CekLembagaNilaiPemeringkat"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekNeracaMinNol"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekNilaiAgunanMinNol"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekPersentaseMaksimal100"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekLembaga-Tanggal-NilaiPeringkat"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekIdentifier"> <satisfied count="1"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekNomor-JumlahAgunan"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekEligibilityJenisAgunan"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_CekSifat-GolonganPenerbitAgunan"> <satisfied count="0"/> <unsatisfied count="0"/> </assertion> <assertion id="Base_cekPeriod"> <satisfied count="1"/> <unsatisfied count="0"/> </assertion></assertions>How can I get the value of <assertion id="SLM_CekNonNegative"> which is SLM_CekNonNegative?Below is the code that I have so far:string pathasr = @"D:\HARPITNAS\dari mbak julia\logs\123456789-2012-09-30-BSMS10.xml-assertions2.xml";List<string> msg = new List<string>();XmlDocument doc = new XmlDocument();doc.Load(pathasr);foreach (XmlNode node in doc.DocumentElement){ string thevaluethatiwantvariable = string.Empty; thevaluethatiwantvariable = ? ; if (node.LastChild.HasChildNodes == true) { string count = node.LastChild.ChildNodes.Count.ToString(); foreach (XmlNode y in node.LastChild.ChildNodes) { string masg = y.InnerXml; msg.Add(masg); } }}This code does not get the value I want. When I debug it, I can see that it doesn't get the correct value. Is it possible to get the value I want?