Rayman_FMC Δημοσ. 16 Μαρτίου 2003 Δημοσ. 16 Μαρτίου 2003 hello, borite na mou pite tropous pou borw na emfanizw xml se html meso javascript? vrika to ekseis scriptaki, alla den kserw pos na tou pw to onoma tou xml arxeiou mou. ------------------------------------------- var xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); function loadXML(xmlFile) {xmlDoc.async="false"; xmlDoc.onreadystatechange=verify; xmlDoc.load(xmlFile);} function verify() {if(xmlDoc.readyState!=4) return false;} function traverse(tree) { if(tree.hasChildNodes()) {document.write('<ul><li>'); var nodes=tree.childNodes.length; for(var i=0; i<tree.childNodes.length; i++) traverse(tree.childNodes(i)); document.write('</li></ul>');} else document.write(tree.text);} function initTraverse(file) {loadXML(file); var doc=xmlDoc.documentElement; traverse(doc);} --------------------------------------------- kserw mono oti emfanizei aftomata opoiodipote arxeio leget data.xml alla thelw na xrisimopieisw allo onoma giati den exw mono ena xml arxeio. an kserete allo tropo, px me XSL an sas einai efkolo... <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/wink.gif" alt="" /> thanx
apoc Δημοσ. 17 Μαρτίου 2003 Δημοσ. 17 Μαρτίου 2003 Rayman_FMC said: hello, borite na mou pite tropous pou borw na emfanizw xml var xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); function loadXML(xmlFile) {xmlDoc.async="false"; xmlDoc.onreadystatechange=verify; xmlDoc.load(xmlFile);} το variable xmlFile indicates the XML file's path so Πριν ξεκινησει η ρουτινα που το φορτωνει (InitTraverse) > xmlFile = "RayMansXMLfile.xml" Το αρχειο φροντισε να ειναι στο ιδιο folder με το html για να δουλεψει αυτο!
Guerriero4 Δημοσ. 17 Μαρτίου 2003 Δημοσ. 17 Μαρτίου 2003 HMMM R WE CHEATING!!!!!!!!!!! Ola ston Brian, tha sou deiksw egw tha deis ti tha patheis <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/laugh.gif" alt="" /> <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/laugh.gif" alt="" /> <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/laugh.gif" alt="" /> Katebazeis pou katebazeis etoimo code, diabase kai ta comments!!! Mesa sto html, ekei pou thes na baleis tin xml: <script language=JavaScript> inittraverse("imacheater.xml"); </script>
Rayman_FMC Δημοσ. 17 Μαρτίου 2003 Μέλος Δημοσ. 17 Μαρτίου 2003 nai to vrika afto...tora psaxnw ta xlinks...vrika ta vrika kai afta diladi. Alla an thelw na ta emfanisw den borw na xrisimopieisw ton kodika afto pou evala panw. Thelei allo tropo, esu ti ekanes? XSL?
Guerriero4 Δημοσ. 17 Μαρτίου 2003 Δημοσ. 17 Μαρτίου 2003 Nai, ti na mplekeis twra me javascript kai malakies..XSL Rules!!
apoc Δημοσ. 17 Μαρτίου 2003 Δημοσ. 17 Μαρτίου 2003 entaksi re paidia kai o kodikas pano..den einai tipota rocket science,...mia anadromh kanei sto DOM kai arxizei kai printarei ta tags! Plain and simple , to me XSL transformations mporeis na kaneis diafora..pragmati alla oxi oti kai afto den einai mia valid lysh!
Rayman_FMC Δημοσ. 18 Μαρτίου 2003 Μέλος Δημοσ. 18 Μαρτίου 2003 as min ksefevgoume omos apo to thema mas.....na vlepw kodikes!!!!! <img src="http://www.insomnia.gr/ubbthreads/images/graemlins/tongue.gif" alt="" />
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.