Created
July 26, 2012 13:58
-
-
Save lvbreda/3182189 to your computer and use it in GitHub Desktop.
XML parser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseXml(xml) | |
{ | |
$("#info").html(''); | |
//print each tutorial title followed by their categories | |
$(xml).find("faktura").each(function() | |
{ | |
var daty = $("</div").addClass("daty"); | |
daty.append('<p class="daty">Wystawiono: ' + $(this).find("wyst").text() + "</p>"); | |
daty.append('<p class="daty">Sprzedano: ' + $(this).find("sprz").text() + "</p>"); | |
daty.append('<p class="daty">Zaplacono: ' + $(this).find("zaplata").text() + "</p>"); | |
$("#info").append(daty); | |
$("#info").append('<p class="netto">Netto: ' + $(this).find("n").text() + "</p>"); | |
$("#info").append('<p class="vat">VAT: ' + $(this).find("vat").text() + "</p>"); | |
$("#info").append('<p class="ndok">Numer Dokumentu: ' + $(this).find("ndok").text() + "</p>"); | |
$("#info").append('<p class="fakwyst">Wystawił: ' + $(this).find("fakwyst").text() + "</p>"); | |
$("#info").append('<p class="nazwaid">Nazwa ID: ' + $(this).find("nazwaid").text() + "</p>"); | |
$("#info").append('<p class="komentarz">Komentarz: ' + $(this).find("komentarz").text() + "</p>"); | |
$("#info").append('<div class="divider"></div>') | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment