Kashub's Code Barn - "test"

podświetlone jako javascript (dodał(a) test @ 2021-02-16 09:20:46)

Twoja wyszukiwarka
Podświetl ten kod w:
Ostatnio dodane:
Losowe wpisy:
var parser = new DOMParser();
            var docXML = parser.parseFromString(readXml, "application/xml");
            console.log(docXML);
 
 
let config = docXML.querySelectorAll('config');
            if (config.length != 0) {
                config.forEach(configElement => {
                    console.log(JSON.stringify(configElement));
                    for (let j = 0; j < configElement.children.length; j++) {
                        let row = configElement.children[j].innerHTML;
                        let rowName = configElement.children[j].nodeName;
                        //console.log(configElement.children[j].nodeName);
                        //console.log(row);
                        var mapTest = new Map();
                        mapTest.set(rowName, row);
                        arr.push(mapTest);
                        for (let k = 0; k < configElement.children[j].children.length; k++) {
                            let row2Value = configElement.children[j].children[k].innerHTML;
                            let row2Name = configElement.children[j].children[k].nodeName;
                            //console.log(configElement.children[j].children[k].nodeName);
                            //console.log(row);
                            var mapTest2 = new Map();
                            mapTest.set(rowName, mapTest2.set({ row2Name, row2Value }));
                            //mapTest.set(mapTest2.set(mapTest2.set(row2Name, row2Value)));
                        }
                    }
                });
            } else { console.log("XML do not have tag config"); }    
| Katalog Sklepów internetowych | | karma dla psa - sklep | | Programista PHP | | Skracacz linków | | Blog o książkach | | Blogi za darmo | | Gdzie przenieść blog za darmo? | | Skracacz linków | | Smutne Opisy | | Opisy na Facebooka |