Jawa / Говнокод #16812 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
for (int i = 1; i <= 3; i++) {
            if (i <= arr.length) {
                xmlDocumentNode.setNodeValue("P_15_" + i, arr[i - 1].getNAME());
                xmlDocumentNode.setNodeValue("P_16_" + i, arr[i - 1].getSERIAL());
                xmlDocumentNode.setNodeValue("P_17_1_" + i, arr[i - 1].getPLANTMANUF());
                xmlDocumentNode.setNodeValue("P_17_2_" + i, arr[i - 1].getPLANTMANUFNAME());
                xmlDocumentNode.setNodeValue("P_18_" + i, arr[i - 1].getDATEMANUF());
                xmlDocumentNode.setNodeValue("P_19_1_" + i, arr[i - 1].getPLANTREP());
                xmlDocumentNode.setNodeValue("P_19_2_" + i, arr[i - 1].getPLANTREPNAME());
                xmlDocumentNode.setNodeValue("P_20_" + i, arr[i - 1].getDATEREP());
                xmlDocumentNode.setNodeValue("P_21_1_" + i, arr[i - 1].getDEFECT());
                xmlDocumentNode.setNodeValue("P_21_2_" + i, arr[i - 1].getDEFECTNAME());
            } else {
                xmlDocumentNode.setNodeValue("P_15_" + i, "");
                xmlDocumentNode.setNodeValue("P_16_" + i, "");
                xmlDocumentNode.setNodeValue("P_17_1_" + i, "");
                xmlDocumentNode.setNodeValue("P_17_2_" + i, "");
                xmlDocumentNode.setNodeValue("P_18_" + i, "");
                xmlDocumentNode.setNodeValue("P_19_1_" + i, "");
                xmlDocumentNode.setNodeValue("P_19_2_" + i, "");
                xmlDocumentNode.setNodeValue("P_20_" + i, "");
                xmlDocumentNode.setNodeValue("P_21_1_" + i, "");
                xmlDocumentNode.setNodeValue("P_21_2_" + i, "");
            }
        }

Обработка XML-таблиц. fillTable? не, не слышал

Запостил: Koshak90 Koshak90, (Updated )

Комментарии (0) RSS

Добавить комментарий

Переведи на "PHP", guest!

    А не использовать ли нам bbcode?


    8