Questione : Nodi dei fratelli germani e del genitore del ritrovamento in DOM

Ciao, avendo questo codice, che trovano tutti i nodi serie, vorrei stampare che cosa è in questa serie dell'elemento ed anche stampare un altro nodo del fratello germano che gli shos il segnale di start che mi dirà il tempo la serie iniziano ad un

=============================TVGuide.xml================================
< della scanalatura…? encoding= " ISO-8859-1 " del version= " 1.0 " del xml?
2001-07-05T19 del
BBC1
del >
" del end= " 2001-07-05 " dello start= " 2001-07-05 del >

2001-07-05T19 " del flag= " del rating= " 5 del
PT30M
QuestionOfSporteries>
<br/> </Program><br/> ": 30: lo spavento di salute dei <Description>Mark di 00<wbr/></Start><br/> <Duration>PT30M</Duration><wbr/><br/> <Series>EastEnders</Series<wbr/>><br/> <Title/><br/> lo forza riconsiderare il suo futuro con Lisa, mentre Jamie è strappato fra <Name>Emma Turner</Name><br/> del <Producer><br/> del <Name>Stewart Edwards</Name><br/> </Director><br/> del <Director><br/> del <Name>Julie Wassmer</Name><br/> </Writer><br/> </Writers><br/> del <Writer><br/> del <Name>Nick Saltrese</Name><br/> </Writer><br/> del <Writer><br/> del <Writers><br/> del <Name>Natalie Cassidy</Name><br/> </Actor><br/> </CastMember><br/> </CastList><br/> del <Actor><br/> di <Name>Sonia Jackson</Name><br/> </Character><br/> del <Character><br/> del <CastMember><br/> del <Name>Jack Ryder</Name><br/> </Actor><br/> </CastMember><br/> del <Actor><br/> del <Name>Jamie Mitchell</Name><br/> </Character><br/> del <Character><br/> del <CastMember><br/> del <Name>Michelle Ryan</Name><br/> </Actor><br/> </CastMember><br/> del <Actor><br/> del <Name>Zoe Slater</Name><br/> </Character><br/> del <Character><br/> del <CastMember><br/> del <CastList><br/> di Zoe.</Description><br e di Sonia/>                  ><br " documentario "/> <Start>2001-07-05T20 del type= del <Program di </Producer><br/> </Program><br/>: 00: <Title>Get di 00<wbr/></Start><br/> <Duration>PT45M</Duration><wbr/><br/> <Series/><br/> reale con il <Program><br/> <Start>2001-07-05T20 di Casualty

: 45: 00
                  PT45M
                  Lottery
                  <br />            </Program><br />            <Program><br />                  <Start>2001-07-05T21:00: 00<wbr /></Start><br />                  <Duration>PT1H</Duration><br />                  <Series>Panorama</Series><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T22:00: 00<wbr /></Start><br />                  <Duration>PT45M</Duration><wbr /><br />                  <Series>Lottery</Series><br />                  <Title/><br />            </Program><br />      </Channel><br />      <Channel><br />            <Name>BBC2</Name><br />            <Program><br />                  <Start>2001-07-05T19:00: 00<wbr /></Start><br />                  <Duration>PT1H</Duration><br />                  <Series>Snooker</Series><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T20:00: 00<wbr /></Start><br />                  <Duration>PT1H</Duration><br />                  <Series>HomeFront</Series><wbr /><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T21:00: ><br " interessante "/> <Start>2001-07-05T21 del flag= del <Program di 00<wbr/></Start><br/> <Duration>PT50M</Duration><wbr/><br/> <Series>WildAfrica</Series<wbr/>><br/> <Title/><br/> </Program><br/>: 50: 00<wbr /></Start><br />                  <Duration>PT40M</Duration><wbr /><br />                  <Series>Taboo</Series><br />                  <Title>Nakedness
            
            
                  2001-07-05T22:30: 00
                  PT45M
                  Lottery
                  <br />            </Program><br />      </Channel><br />      <Channel><br />            <Name>ITV</Name><br />            <Program><br />                  <Start>2001-07-05T19:00: 00<wbr /></Start><br />                  <Duration>PT30M</Duration><wbr /><br />                  <Series>Emmerdale</Series><wbr /><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T19:30: 00<wbr /></Start><br />                  <Duration>PT30M</Duration><wbr /><br />                  <Series>CoronationStreet</<wbr />Series><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T20:00: ><br/> <Start>2001-07-05T21 " di dramma " del type= del <Program di 00<wbr/></Start><br/> <Duration>PT1H</Duration><br/> <Series>Millionaire</Serie<wbr/>s><br/> <Title/><br/> </Program><br/>: 00: 00<wbr /></Start><br />                  <Duration>PT2H</Duration><br />                  <Series/><br />                  <Title>Hot Money
            

      
      
            Channel 4
            
                  2001-07-05T19:00: 00
                  PT55M
                  Channel4Newses>
                  <br />            </Program><br />            <Program><br />                  <Start>2001-07-05T19:55: 00<wbr /></Start><br />                  <Duration>PT5M</Duration><br />                  <Series>SlotArt</Series><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T20:00: 00<wbr /></Start><br />                  <Duration>PT30M</Duration><wbr /><br />                  <Series>Brookside</Series><wbr /><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T20:30: 00<wbr /></Start><br />                  <Duration>PT30M</Duration><wbr /><br />                  <Series>Brookside</Series><wbr /><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T21:00: ><br " favorito "/> <Start>2001-07-05T22 del flag= del <Program di 00<wbr/></Start><br/> <Duration>PT1H</Duration><br/> <Series>Swallow</Series><br/> <Title/><br/> </Program><br/>: 00: 00<wbr /></Start><br />                  <Duration>PT1H</Duration><br />                  <Series>AllyMcBeal</Series<wbr />><br />                  <Title/><br />            </Program><br />      </Channel><br />      <Channel><br />            <Name>Channel 5</Name><br />            <Program><br />                  <Start>2001-07-05T19:00: 00<wbr /></Start><br />                  <Duration>PT30M</Duration><wbr /><br />                  <Series>MovieChartShow</Se<wbr />ries><br />                  <Title/><br />            </Program><br />            <Program><br />                  <Start>2001-07-05T19:30: ><br/> <Start>2001-07-05T20 " di intrattenimento " del type= del <Program di 00<wbr/></Start><br/> <Duration>PT30M</Duration><wbr/><br/> <Series>5News</Series><br/> <Title/><br/> </Program><br/>: 00: i driver più difettosi del mondo del <Title>The di 00<wbr/></Start><br/> <Duration>PT1H</Duration><br/> <Series/><br/> hanno attaccato al ><br/> <Start>2001-07-05T21 " della pellicola " del type= del <Program di Tape

: 00:
2001-07-05T21 del

di 00
PT1H55Mn>

: 55: 00
                  PT30M
                  Brookside
                  <br />            </Program><br />      </Channel><br /></TVGuide><br />==========================<wbr />==========<wbr />==========<wbr />==========<wbr />==========<wbr />==========<wbr />=</span> </div></div> class= ></div> " libero " del <div class= " qCodeSnippetRow " del <div > ><table> " del codeSnippet " del class= del <div <tr> class= " lineNumbers " del <td > <pre> 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: </pre> </td> class= del <td " codeBody " > >import notpretty java.io.* " del class= " del id= " codeSnippet653782 del <pre "; importazione javax.xml.parsers.*; importazione org.w3c.dom.*; importazione org.xml.sax.*; importazione javax.xml.transform.*; importazione javax.xml.transform.dom.DOMSource; importazione javax.xml.transform.stream.StreamResult; codice categoria pubblico DisplayElementNodes { vuoto statico del pubblico principale (arg della stringa []) { prova { BufferedReader BF = nuovo BufferedReader (nuovo InputStreamReader (System.in)); System.out.print (“entrare in un nome di schedario di XML: "); Stringa xmlFile = bf.readLine (); Lima della lima = nuova lima (xmlFile); se (file.exists ()){ Fabbrica di DocumentBuilderFactory = DocumentBuilderFactory.newInstance (); Costruttore di DocumentBuilder = factory.newDocumentBuilder (); Documento documento = builder.parse (xmlFile); TransformerFactory tranFactory = TransformerFactory.newInstance (); aTransformer del trasformatore = tranFactory.newTransformer (); ============================================================================================================= di // // ottiene la lista di nodi di tutti gli elementi Lista di NodeList = doc.getElementsByTagName (“serie„); per (int i=0; i<list.getLength (); i++) { // ottiene l'elemento Elemento dell'elemento = (elemento) list.item (i); Src di fonte = nuovo DOMSource (elemento); System.out.println (“no. di nodo: „ + la i + “è„ + element.getNodeName ()); System.out.println (“la relativa rappresentazione corrispondente del xml: "); Risultato dest = nuovo StreamResult (System.out); aTransformer.transform (src, dest); System.out.println (“\ n„); } } altrimenti { System.out.println (xmlFile + “(nome di schedario) non trova! "); } } fermo (eccezione e) { e.getMessage (); } } } </pre> </td> </tr> </table></div> </div> class= del <div " libero " ></span></h4> </td> </tr> <tr><td height="2px"></td></tr> <tr style="background-color:#f2f4f6"><td > <h2 style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:14px;color:red;font-weight:bold"> <span id="ContentPlaceHolder1_tieude_as">Risposta : Nodi dei fratelli germani e del genitore del ritrovamento in DOM</span> </h2></td></tr> <tr> <td valign="top"> <h5><span id="ContentPlaceHolder1_ans" style="font-family:Tahoma,Geneva,sans-serif;font-size:12px;font-weight:normal;color:#000000"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <div class="KonaBody"><div class="richText"> realmente non lo restituirà direttamente il fratello germano… poiché ci sono nel fratempo nodi del testo,<br />per per esempio,<br /><br />per per trovare valore che del nodo di inizio dovete avere somethin come questo,<br /><br />findStart della stringa (serie di nodo) {<br /><br />    startNode di nodo = series.getPreviousSibling (<wbr />);<br />   se (startNode.getNodeName.eqauls<wbr /> (“inizio„<wbr />)) {<br />     startNode.getChildNodes di ritorno () .items<wbr /> (0) .getNodeValue<wbr /><wbr /> ();<br />   } altrimenti {<br />     findStartNode di ritorno (statrNode);<br />   }<br />}<br /><br />ho indicato soltanto per i fratelli germani precedenti. probabilmente dovrete andare thro NextSiblings anche,<br /></div></div> <!-- text-ad & richText --> <span class="isBotVideo"> <span class="isBotVideo"></span></span> </div> </span></h5> </td> </tr> <tr><td height="5px"></td></tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="100%" height="25px" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100px" bgcolor="#FFFFFF" style="padding-left:5px"><span class="f11blue">Altre soluzioni</span></td> <td background="http://programming4.us/images/bg-ch.gif"> </td> </tr> </table></td> </tr> <tr> <td style="padding:5px"> <div> <table id="ContentPlaceHolder1_DataList2" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/4416.aspx' class="a4"> <li> Sysprepping Windows 7 pc</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/30400.aspx' class="a4"> <li> Ciclaggio complesso di domanda di Coldfusion</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/16560.aspx' class="a4"> <li> SPContext.Current sta restituendo la posizione di segnale minimo nell'alimentatore di evento “di SPItemEventReceiver„.</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/22872.aspx' class="a4"> <li> IL CSS che IL MIME errato scriv dentro Firefox a macchina su Apache, il testo/css .css di AddType è là</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/7780.aspx' class="a4"> <li> MAcbook pro rifiuta di collegarsi via Ethernet ma impianti via il wifi</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/software/33764.aspx' class="a4"> <li> Cliente del Java applet - Eccezione di sicurezza</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/124.aspx' class="a4"> <li> Mostrare tutte le annotazioni nella domanda se niente selezionato in Listbox - la parte II</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/26232.aspx' class="a4"> <li> Mouseover su div.a cambia la disposizione di div.b (CSS puro)</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/32544.aspx' class="a4"> <li> Azionamento duro PowerEdge guast 1850 di incursione 1</li></a> </td> </tr> </table> </td> </tr><tr> <td> <table> <tr> <td valign="top" align="left"> <a href='http://faq.wmlcloud.com/it/microsoft/18704.aspx' class="a4"> <li> asp - La risorsa non ha potuto essere trovata</li></a> </td> </tr> </table> </td> </tr> </table> </div></td> </tr> </table></td> </tr> </table> </div> </td></tr> </table> </form> </td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table> </td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="http://tutorial.wmlcloud.com/images/bg-mn.jpg" height="30px" style="padding:5px;color:#ffffff;font-size:12px; font-family:Tahoma, Geneva, sans-serif;text-decoration: none;" ></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="http://tutorial.wmlcloud.com/images/bo-l.png" alt="programming4us" width="8" height="9" /></td> <td bgcolor="#FFFFFF" width="100%"></td> <td><img src="http://tutorial.wmlcloud.com/images/bo-r.png" alt="programming4us" width="8" height="9" /></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> <tr><td height="2px"></td></tr> <tr><td> <div align="center"> </div> </td> </tr> <tr><td height="3px"></td></tr> <tr> <td height="2px"></td> </tr> <tr> <td align="left"> <table cellpadding="0" cellspacing="0" width="100%" align="left"> <tr> <td valign="top"> <div id="en"><a href='http://faq.wmlcloud.com/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/en.gif'></a></div> </td> <td valign="top"> <div id="de"><a href='http://faq.wmlcloud.com/de/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/de.gif'></a></div> </td> <td valign="top"> <div id="es"><a href='http://faq.wmlcloud.com/es/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/es.gif'></a></div> </td> <td valign="top"> <div id="fr"><a href='http://faq.wmlcloud.com/fr/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/fr.gif'></a></div> </td> <td valign="top"> <div id="nl"><a href='http://faq.wmlcloud.com/nl/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/nl.gif'></a></div> </td> <td valign="top"> <div id="it"><a href='http://faq.wmlcloud.com/it/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/it.gif'></a></div> </td> <td valign="top"> <div id="ru"><a href='http://faq.wmlcloud.com/ru/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/ru.gif'></a></div> </td> <td valign="top"> <div id="se"><a href='http://faq.wmlcloud.com/se/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/se.gif'></a></div> </td> <td valign="top"> </td> <td valign="top"> <div id="pt"><a href='http://faq.wmlcloud.com/pt/software/73354.aspx'><img src='http://faq.wmlcloud.com/flags/pt.gif'></a></div> </td> <td valign="top"> </td> <td valign="top"> </td> </tr> </table> </td> </tr> <tr> <td height="2px"></td> </tr> </td></tr> </table> <script src="//cdn.intergient.com/ramp_core.js"></script> </body> </html>