XML doubt - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » XML doubt XML doubt Last post 11-09-2006 10:10 PM by Shiva. 3 replies. Page 1 of 1 (4 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 11-07-2006 11:06 AM shayken Joined on 05-12-2006 Posts 17 XML doubt Reply Contact I have this XML:- <DISCIPLINAS>- <DISCIPLINA> <CDTURMA>168</CDTURMA> <NODISCIPLINA>CALCULO I</NODISCIPLINA> - <PROFESSORES> <NOPROFESSOR>PARDAL</NOPROFESSOR> </PROFESSORES> </DISCIPLINA>- <DISCIPLINA> <CDTURMA>155</CDTURMA> <NODISCIPLINA>ALGEBRA I</NODISCIPLINA> - <PROFESSORES> <NOPROFESSOR>COMPILO DAS LINHAS </NOPROFESSOR> <NOPROFESSOR>DEDILOQUIO TRAVANCO</NOPROFESSOR> </PROFESSORES> </DISCIPLINA> </DISCIPLINAS>I need to know how many "NOPROFESSOR" exist in each "DISCIPLINA", I tried something like this:var cont = xmlDoc.getElementsByTagName("DISCIPLINA").length;for (i=0;i<cont;i++) { xmlDoc.getElementsByTagName("DISCIPLINA")(i).getElementsByTagName("PROFESSOR").length; // ....} 11-07-2006 03:44 PM In reply to Greg Collins Joined on 08-08-2006 Posts 2,126 Re: XML doubt Mark as Not AnswerMark as Answer... Reply Contact I notice that you are not setting the professor length to a var.So what kinds of problems are you having? Please Visit:BraintroveGreg's Paintings 11-08-2006 06:31 AM In reply to shayken Joined on 05-12-2006 Posts 17 Re: XML doubt Mark as Not AnswerMark as Answer... Reply Contact I put this code only to give a idea of what I am making, sorry for the confusion.My problem is xmlDoc.getElementsByTagName("DISCIPLINA")(i).getElementsByTagName("PROFESSOR").length"Are returning "0", as when i=0 as when i=1Thanks 11-09-2006 10:10 PM In reply to Shiva Joined on 04-15-2005 India Posts 694 Re: XML doubt Mark as Not AnswerMark as Answer... Reply Contact Hi Shayken,Can you check first as below the code returns correctly or notVar disciplinaLength = xmlDoc.getElementsByTagName("DISCIPLINA")(i).length;After it returns the number then you can try your code. One more is you given example node name is PROFESSORES but you are trying PROFESSOR . Can you check once again node name is correct or not. Shiva / http://www.ggktech.com Page 1 of 1 (4 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.