473,614 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML problem when trying to loop through child nodes

4 New Member
Hi,
I have one problem when i'm trying to loop thorugh the child nodes in a XML string in JAVA. The first Loop is working but in the child node there i want to loop and get the values but it doesn't change the value. Always print the first child node value. I got the length of the child nodes but ..... Pls see the xml string.

I want to print the service class and availabilty in the each flightinfo node. I got he lenth of flightinfo also the infoonClasses. But it always print the first Class and Avalibilty in the entire loop.

can any on tell me how can loopthrough the child nodes......

Expand|Select|Wrap|Line Numbers
  1. <MultiAvailabilityReply>
  2.     <flightInfo>
  3.         <basicFlightInfo>
  4.             <flightDetails>
  5.                 <departureDate>250307</departureDate>
  6.                 <departureTime>0030</departureTime>
  7.                 <arrivalDate>250307</arrivalDate>
  8.                 <arrivalTime>0820</arrivalTime>
  9.             </flightDetails>
  10.             <departureLocation>
  11.                 <cityAirport>BOM</cityAirport>
  12.             </departureLocation>
  13.             <arrivalLocation>
  14.                 <cityAirport>SIN</cityAirport>
  15.             </arrivalLocation>
  16.             <marketingCompany>
  17.                 <identifier>SQ</identifier>
  18.             </marketingCompany>
  19.             <flightIdentification>
  20.                 <number>423</number>
  21.             </flightIdentification>
  22.             <productTypeDetail>
  23.                 <productIndicators>D</productIndicators>
  24.                 <productIndicators>EN</productIndicators>
  25.             </productTypeDetail>
  26.             <lineItemNumber>1</lineItemNumber>
  27.         </basicFlightInfo>
  28.         <infoOnClasses>
  29.             <productClassDetail>
  30.                 <serviceClass>F</serviceClass>
  31.                 <availabilityStatus>4</availabilityStatus>
  32.             </productClassDetail>
  33.         </infoOnClasses>
  34.         <infoOnClasses>
  35.             <productClassDetail>
  36.                 <serviceClass>P</serviceClass>
  37.                 <availabilityStatus>4</availabilityStatus>
  38.             </productClassDetail>
  39.         </infoOnClasses>
  40.         <infoOnClasses>
  41.             <productClassDetail>
  42.                 <serviceClass>A</serviceClass>
  43.                 <availabilityStatus>4</availabilityStatus>
  44.             </productClassDetail>
  45.         </infoOnClasses>
  46.         <infoOnClasses>
  47.             <productClassDetail>
  48.                 <serviceClass>Z</serviceClass>
  49.                 <availabilityStatus>4</availabilityStatus>
  50.             </productClassDetail>
  51.         </infoOnClasses>
  52.         <infoOnClasses>
  53.             <productClassDetail>
  54.                 <serviceClass>C</serviceClass>
  55.                 <availabilityStatus>4</availabilityStatus>
  56.             </productClassDetail>
  57.         </infoOnClasses>
  58.         <infoOnClasses>
  59.             <productClassDetail>
  60.                 <serviceClass>J</serviceClass>
  61.                 <availabilityStatus>4</availabilityStatus>
  62.             </productClassDetail>
  63.         </infoOnClasses>
  64.         <infoOnClasses>
  65.             <productClassDetail>
  66.                 <serviceClass>D</serviceClass>
  67.                 <availabilityStatus>4</availabilityStatus>
  68.             </productClassDetail>
  69.         </infoOnClasses>
  70.         <infoOnClasses>
  71.             <productClassDetail>
  72.                 <serviceClass>Y</serviceClass>
  73.                 <availabilityStatus>9</availabilityStatus>
  74.             </productClassDetail>
  75.         </infoOnClasses>
  76.         <infoOnClasses>
  77.             <productClassDetail>
  78.                 <serviceClass>B</serviceClass>
  79.                 <availabilityStatus>9</availabilityStatus>
  80.             </productClassDetail>
  81.         </infoOnClasses>
  82.         <infoOnClasses>
  83.             <productClassDetail>
  84.                 <serviceClass>M</serviceClass>
  85.                 <availabilityStatus>9</availabilityStatus>
  86.             </productClassDetail>
  87.         </infoOnClasses>
  88.         <infoOnClasses>
  89.             <productClassDetail>
  90.                 <serviceClass>W</serviceClass>
  91.                 <availabilityStatus>9</availabilityStatus>
  92.             </productClassDetail>
  93.         </infoOnClasses>
  94.         <infoOnClasses>
  95.             <productClassDetail>
  96.                 <serviceClass>Q</serviceClass>
  97.                 <availabilityStatus>9</availabilityStatus>
  98.             </productClassDetail>
  99.         </infoOnClasses>
  100.         <infoOnClasses>
  101.             <productClassDetail>
  102.                 <serviceClass>N</serviceClass>
  103.                 <availabilityStatus>9</availabilityStatus>
  104.             </productClassDetail>
  105.         </infoOnClasses>
  106.         <infoOnClasses>
  107.             <productClassDetail>
  108.                 <serviceClass>V</serviceClass>
  109.                 <availabilityStatus>1</availabilityStatus>
  110.             </productClassDetail>
  111.         </infoOnClasses>
  112.         <infoOnClasses>
  113.             <productClassDetail>
  114.                 <serviceClass>T</serviceClass>
  115.                 <availabilityStatus>0</availabilityStatus>
  116.             </productClassDetail>
  117.         </infoOnClasses>
  118.         <infoOnClasses>
  119.             <productClassDetail>
  120.                 <serviceClass>L</serviceClass>
  121.                 <availabilityStatus>0</availabilityStatus>
  122.             </productClassDetail>
  123.         </infoOnClasses>
  124.         <infoOnClasses>
  125.             <productClassDetail>
  126.                 <serviceClass>K</serviceClass>
  127.                 <availabilityStatus>0</availabilityStatus>
  128.             </productClassDetail>
  129.         </infoOnClasses>
  130.         <infoOnClasses>
  131.             <productClassDetail>
  132.                 <serviceClass>S</serviceClass>
  133.                 <availabilityStatus>9</availabilityStatus>
  134.             </productClassDetail>
  135.         </infoOnClasses>
  136.         <infoOnClasses>
  137.             <productClassDetail>
  138.                 <serviceClass>E</serviceClass>
  139.                 <availabilityStatus>9</availabilityStatus>
  140.             </productClassDetail>
  141.         </infoOnClasses>
  142.         <infoOnClasses>
  143.             <productClassDetail>
  144.                 <serviceClass>H</serviceClass>
  145.                 <availabilityStatus>9</availabilityStatus>
  146.             </productClassDetail>
  147.         </infoOnClasses>
  148.         <additionalFlightInfo>
  149.             <flightDetails>
  150.                 <typeOfAircraft>773</typeOfAircraft>
  151.                 <numberOfStops>0</numberOfStops>
  152.                 <legDuration>0520</legDuration>
  153.             </flightDetails>
  154.             <departureStation>
  155.                 <terminal>2</terminal>
  156.             </departureStation>
  157.             <arrivalStation>
  158.                 <terminal>2</terminal>
  159.             </arrivalStation>
  160.             <productFacilities>
  161.                 <type>AS</type>
  162.             </productFacilities>
  163.             <productFacilities>
  164.                 <type>DA</type>
  165.             </productFacilities>
  166.             <productFacilities>
  167.                 <type>LSA</type>
  168.             </productFacilities>
  169.             <productFacilities>
  170.                 <type>M</type>
  171.             </productFacilities>
  172.         </additionalFlightInfo>
  173.     </flightInfo>
  174.     <flightInfo>
  175.         <basicFlightInfo>
  176.             <flightDetails>
  177.                 <departureDate>250307</departureDate>
  178.                 <departureTime>0645</departureTime>
  179.                 <arrivalDate>250307</arrivalDate>
  180.                 <arrivalTime>1425</arrivalTime>
  181.             </flightDetails>
  182.             <departureLocation>
  183.                 <cityAirport>BOM</cityAirport>
  184.             </departureLocation>
  185.             <arrivalLocation>
  186.                 <cityAirport>SIN</cityAirport>
  187.             </arrivalLocation>
  188.             <marketingCompany>
  189.                 <identifier>AI</identifier>
  190.             </marketingCompany>
  191.             <flightIdentification>
  192.                 <number>472</number>
  193.             </flightIdentification>
  194.             <productTypeDetail>
  195.                 <productIndicators>D</productIndicators>
  196.                 <productIndicators>ET</productIndicators>
  197.             </productTypeDetail>
  198.             <lineItemNumber>2</lineItemNumber>
  199.         </basicFlightInfo>
  200.         <infoOnClasses>
  201.             <productClassDetail>
  202.                 <serviceClass>J</serviceClass>
  203.                 <availabilityStatus>4</availabilityStatus>
  204.             </productClassDetail>
  205.         </infoOnClasses>
  206.         <infoOnClasses>
  207.             <productClassDetail>
  208.                 <serviceClass>C</serviceClass>
  209.                 <availabilityStatus>4</availabilityStatus>
  210.             </productClassDetail>
  211.         </infoOnClasses>
  212.         <infoOnClasses>
  213.             <productClassDetail>
  214.                 <serviceClass>D</serviceClass>
  215.                 <availabilityStatus>4</availabilityStatus>
  216.             </productClassDetail>
  217.         </infoOnClasses>
  218.         <infoOnClasses>
  219.             <productClassDetail>
  220.                 <serviceClass>W</serviceClass>
  221.                 <availabilityStatus>4</availabilityStatus>
  222.             </productClassDetail>
  223.         </infoOnClasses>
  224.         <infoOnClasses>
  225.             <productClassDetail>
  226.                 <serviceClass>Y</serviceClass>
  227.                 <availabilityStatus>R</availabilityStatus>
  228.             </productClassDetail>
  229.         </infoOnClasses>
  230.         <infoOnClasses>
  231.             <productClassDetail>
  232.                 <serviceClass>B</serviceClass>
  233.                 <availabilityStatus>4</availabilityStatus>
  234.             </productClassDetail>
  235.         </infoOnClasses>
  236.         <infoOnClasses>
  237.             <productClassDetail>
  238.                 <serviceClass>H</serviceClass>
  239.                 <availabilityStatus>4</availabilityStatus>
  240.             </productClassDetail>
  241.         </infoOnClasses>
  242.         <infoOnClasses>
  243.             <productClassDetail>
  244.                 <serviceClass>K</serviceClass>
  245.                 <availabilityStatus>4</availabilityStatus>
  246.             </productClassDetail>
  247.         </infoOnClasses>
  248.         <infoOnClasses>
  249.             <productClassDetail>
  250.                 <serviceClass>L</serviceClass>
  251.                 <availabilityStatus>4</availabilityStatus>
  252.             </productClassDetail>
  253.         </infoOnClasses>
  254.         <infoOnClasses>
  255.             <productClassDetail>
  256.                 <serviceClass>M</serviceClass>
  257.                 <availabilityStatus>4</availabilityStatus>
  258.             </productClassDetail>
  259.         </infoOnClasses>
  260.         <infoOnClasses>
  261.             <productClassDetail>
  262.                 <serviceClass>V</serviceClass>
  263.                 <availabilityStatus>4</availabilityStatus>
  264.             </productClassDetail>
  265.         </infoOnClasses>
  266.         <infoOnClasses>
  267.             <productClassDetail>
  268.                 <serviceClass>G</serviceClass>
  269.                 <availabilityStatus>4</availabilityStatus>
  270.             </productClassDetail>
  271.         </infoOnClasses>
  272.         <additionalFlightInfo>
  273.             <flightDetails>
  274.                 <typeOfAircraft>310</typeOfAircraft>
  275.                 <numberOfStops>0</numberOfStops>
  276.                 <legDuration>0510</legDuration>
  277.             </flightDetails>
  278.             <departureStation>
  279.                 <terminal>2</terminal>
  280.             </departureStation>
  281.             <arrivalStation>
  282.                 <terminal>1</terminal>
  283.             </arrivalStation>
  284.             <productFacilities>
  285.                 <type>AS</type>
  286.             </productFacilities>
  287.             <productFacilities>
  288.                 <type>DA</type>
  289.             </productFacilities>
  290.             <productFacilities>
  291.                 <type>M</type>
  292.             </productFacilities>
  293.         </additionalFlightInfo>
  294.     </flightInfo>
  295.     <MultiAvailabilityReply>
  296.  
Apr 16 '07 #1
3 3134
dorinbogdan
839 Recognized Expert Contributor
Welcome to TheScripts TSDN...

Please also post the Java code necessary for a quick test.

Thanks,
Dorin.
Apr 16 '07 #2
jismon
4 New Member
Thanks for a quick reply,
pls check the below code,


Expand|Select|Wrap|Line Numbers
  1. import javax.xml.parsers.DocumentBuilder;
  2. import javax.xml.parsers.DocumentBuilderFactory;
  3. import java.io.StringReader;
  4.  
  5.  
  6. import org.w3c.dom.Document;
  7. import org.w3c.dom.Element;
  8. import org.w3c.dom.Node;
  9. import org.w3c.dom.NodeList;
  10. import org.xml.sax.InputSource;
  11. import org.xml.sax.SAXException;
  12. import org.xml.sax.SAXParseException;
  13.  
  14. import com.sun.org.apache.xerces.internal.dom.ChildNode;
  15.  
  16. public class FlightAvailability {
  17.  
  18.     public static void main(String[] args) {
  19.  
  20.         multiAvailResPage();
  21.     }
  22.  
  23.     public static void multiAvailResPage(){
  24.         try {
  25.  
  26.             DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
  27.             DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
  28.             String strOutPut="";
  29.             String strOutPut1="";
  30.             String source;
  31.             String destination;
  32.             String[] depDate;
  33.             String[] arrDate;
  34.             String[] deptTime;
  35.             String[] arrTime;
  36.             String[] carrierName;
  37.             String[] flightNo;
  38.             String[] serClass;
  39.             String[] vacantSeats;
  40.             depDate    =new String[100];
  41.             arrDate=new String[100];
  42.             deptTime = new String[100];
  43.             arrTime    = new String[100];
  44.             carrierName=new String[100];
  45.             flightNo=new String[100];
  46.             serClass= new String[500];
  47.             vacantSeats=new String[500];
  48.  
  49.             String xmlString = <Pls pate the xml string here>;
  50.             StringReader sr = new StringReader((String) xmlString);
  51.             InputSource iSrc = new InputSource(sr);
  52.             Document doc = docBuilder.parse(iSrc);
  53.             doc.getDocumentElement().normalize();
  54.             //System.out.println ("Root element of the doc is " + doc.getDocumentElement().getNodeName());
  55.  
  56.  
  57.  
  58.             strOutPut="<table border='0'>";
  59.  
  60.             NodeList departure = doc.getElementsByTagName("origin");
  61.             Element departurePlace = (Element)departure.item(0);
  62.             NodeList originValue = departurePlace.getChildNodes();
  63.             source=((Node)originValue.item(0)).getNodeValue();
  64.  
  65.             NodeList arrival = doc.getElementsByTagName("destination");
  66.             Element arrivalPlace    =(Element)arrival.item(0);
  67.             NodeList arrivalValue    = arrivalPlace.getChildNodes();
  68.             destination= ((Node)arrivalValue.item(0)).getNodeValue();
  69.  
  70.             System.out.println("Source        " + source);
  71.             System.out.println("Destination " + destination);
  72.  
  73.             strOutPut1="<tr><td border=0>From:</td><td border=0><input type='text' readOnly name='source' value=" + source+"></td>";
  74.             strOutPut1=strOutPut1+ "<td border=0>Destination:</td><td border=0><input type='text' readOnly name='destination' value=" + destination+"></td></tr>";
  75.             //ChildNode rootNode = doc.getElementsByTagName("flightInfo");
  76.             NodeList rootNode = doc.getElementsByTagName("flightInfo");        
  77.  
  78.             int nodeLength = rootNode.getLength();
  79.             //System.out.println("Total no of flightInfo : " + nodeLength);
  80.  
  81.             for(int s=0; s<nodeLength; s++){
  82.  
  83.                 Node firstNode = rootNode.item(s);
  84.                 System.out.println("Total no of Innder Child : " + firstNode.getChildNodes().getLength());
  85.                 if(firstNode.getNodeType() == Node.ELEMENT_NODE){
  86.  
  87.  
  88.                     // System.out.println("My Class : " +  getNodeValue.getNodDetails("serviceClass",firstNode));
  89.                     // System.out.println("Available Seat : " +  getNodeValue.getNodDetails("availabilityStatus",firstNode));
  90.  
  91.                     Node innerChildNode=firstNode.getFirstChild();
  92.  
  93. //                    
  94.                     arrDate[s]=getNodeValue.getNodDetails("arrivalDate",firstNode);
  95.                     depDate[s]= getNodeValue.getNodDetails("departureDate",firstNode);
  96.                     deptTime[s]= getNodeValue.getNodDetails("departureTime",firstNode);
  97.                     arrTime[s]=    getNodeValue.getNodDetails("arrivalTime",firstNode);
  98.                     carrierName[s]=getNodeValue.getNodDetails("identifier",firstNode);
  99.                     flightNo[s]    =getNodeValue.getNodDetails("number",firstNode);
  100.  
  101.                     int childLength=firstNode.getChildNodes().getLength();
  102.  
  103.                     for(int childNodeLen=0;childNodeLen < childLength;childNodeLen++)
  104.                     {                    
  105.                         System.out.println("Loop No : " + childNodeLen);
  106.                         Node myInnderNode= innerChildNode.getNextSibling();
  107.                         String nodeName= myInnderNode.getNodeName();
  108.                         System.out.println("nodeName : "+nodeName );
  109.                         if(nodeName == "serviceClass"){
  110.                             System.out.println("Jismon : " );
  111.                         }
  112.                         System.out.println("Class : " +  getNodeValue.getNodDetails("serviceClass",myInnderNode));
  113.                         System.out.println("Available Seat : " +  getNodeValue.getNodDetails("availabilityStatus",myInnderNode));
  114.                         //myInnderNode=firstNode.getChildNodes().item(childNodeLen);
  115.                         myInnderNode=innerChildNode.getNextSibling();
  116.  
  117.  
  118.                     }
  119.                     //Node innerNode = firstNode.getNextSibling();
  120.  
  121.  
  122.                     //for(int myInt=0;myInt<firstNode.getChildNodes().getLength();myInt++)
  123.                     //{
  124.                         /*if( firstNode.getChildNodes().item(s).getNodeName().equalsIgnoreCase("infoOnClasses"))
  125.                         {
  126.  
  127.                              Node InnerNode=firstNode.getChildNodes().item(s).getFirstChild();
  128.                              System.out.println("i st loop : " +  InnerNode.getChildNodes().getLength());
  129.  
  130.                              for(int InnerNodeLength=0;InnerNodeLength < InnerNode.getChildNodes().getLength();InnerNodeLength++)
  131.                              {
  132.                                 // serClass[InnerNodeLength]=getNodeValue.getNodDetails("productClassDetail",InnerNode);
  133.                                  System.out.println("My Class : " +  getNodeValue.getNodDetails("serviceClass",InnerNode));
  134.                                  System.out.println("Available Seat : " +  getNodeValue.getNodDetails("availabilityStatus",InnerNode));
  135.                              }
  136.  
  137.                         }*/
  138.                     //}
  139.  
  140.                     /*if(firstNode.getNodeName().equalsIgnoreCase("infoOnClasses"))
  141.                     {
  142.                         //Node myInnerChild=firstNode.get);
  143.  
  144.                         NodeList myNode = firstNode.getChildNodes();
  145.                         System.out.println("My Print : " + myNode.getLength());
  146.                     }*/
  147.  
  148.                     //int innernodLen = innerNode.getLength();
  149.  
  150.                     /*
  151.  
  152.                     for(int p=0; p<innernodLen; p++){
  153.                         Node innerfirstNode = innerNode.item(p);
  154.                         if(innerfirstNode.getNodeType() == Node.ELEMENT_NODE){
  155.  
  156.                             serClass[p]=getNodeValue.getNodDetails("serviceClass",innerfirstNode);
  157.                             vacantSeats[p]=getNodeValue.getNodDetails("availabilityStatus",innerfirstNode);
  158.                             System.out.println("Service Class " + serClass[p]);
  159.                             System.out.println("Availability  " + vacantSeats[p]);
  160.  
  161.                             //System.out.println("Loop No " + p);
  162.  
  163.                         }
  164.  
  165.                     }*/
  166.                     System.out.println("+++++++++++++++++++++++++++++++");
  167.                     //System.out.println("Inner Node Length  " + innernodLen);
  168.                     System.out.println("Depat date    " + depDate[s]);
  169.                     System.out.println("Depat Time    " + deptTime[s]);
  170.                     System.out.println("Arrival date  " + arrDate[s]);
  171.                     System.out.println("Arrival Time  " + arrTime[s]);
  172.                     System.out.println("Carrier Name  " + carrierName[s]);
  173.                     System.out.println("Flight No     " + flightNo[s]);
  174.  
  175.  
  176.                 }
  177.             }
  178.             strOutPut1=strOutPut1 + "<tr><td>Departure Date:</td><td><input type='text' readOnly name='deptDate' value=" +depDate+"></td></tr>";
  179.             strOutPut=strOutPut+strOutPut1+"</table>";
  180.             System.out.println("HTML STRING : " +strOutPut);
  181.  
  182.         }catch (SAXParseException err) {
  183.             System.out.println ("** Parsing error" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
  184.             System.out.println(" " + err.getMessage ());
  185.  
  186.             }catch (SAXException e) {
  187.             Exception x = e.getException ();
  188.             ((x == null) ? e : x).printStackTrace ();
  189.  
  190.             }catch (Throwable t) {
  191.             t.printStackTrace ();
  192.             }
  193.  
  194.  
  195.         }
  196.  
  197. }
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. import org.w3c.dom.Element;
  205. import org.w3c.dom.Node;
  206. import org.w3c.dom.NodeList;
  207.  
  208. /**
  209.  * @Jismon Raju K
  210.  *
  211.  */
  212. public class getNodeValue {
  213.  
  214.     public static String getNodDetails(String tagName,Node myNode){
  215.         String tagValue="";
  216.         Element firstDatasourceElement = (Element)myNode; 
  217.         NodeList departureDate = firstDatasourceElement.getElementsByTagName(tagName);
  218.         Element departureDateValue = (Element)departureDate.item(0);
  219.         NodeList deptValue = departureDateValue.getChildNodes();
  220.         //System.out.println("Departure Date : " + ((Node)childNodes.item(0)).getNodeValue().trim());
  221.         tagValue=((Node)deptValue.item(0)).getNodeValue();
  222.         return tagValue;
  223.     }
  224.  
  225.  
  226. }
Apr 16 '07 #3
dorinbogdan
839 Recognized Expert Contributor
Ok,
I will copy this thread to Java forum too, they may answer quicker.
Apr 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
4150
by: kaeli | last post by:
Can anyone explain this to me? It's driving me insane. Save this and run it in IE or Opera and then in Mozilla or Netscape 6+. In IE/Opera, I get the expected 4 alerts. In Mozilla/Netscape, I get *9*. In the example table, there are 4 rows with 4 columns each in the tbody. I'd expect 4 child nodes for the table body with 4 children each. I get those 4 plus 5 alerts in Mozilla/Netscape. I get only those 4 in IE and Opera. Note that...
1
4740
by: mr_burns | last post by:
Hi, I have the following code that works fine except the getAttribute line: var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.load("note.xml"); nodes = xmlDoc.documentElement.childNodes; text = '<p>note:<br>';
1
1941
by: clintonG | last post by:
How do I get a TreeNode.Parent property when using the 2.0 TreeView control? When the data source is an XML file there may be redundant names in the tree. For example, when a child node with the value of 'name' is selected I don't have a clue how to get the name of its parent which may be 'person' or 'school.' <%= Clinton Gallagher
12
20518
by: Dino L. | last post by:
I am putting data from DataTable to treeView foreach( DataRow aRow in aTable.Rows) { TreeNode tnode = new TreeNode(aRow.ToString() + aRow.ToString() + " " + aRow.ToString()); treeView1.Nodes.Add(tnode); //till here code works fine //now I wanna add child nodes for last inserted node foreach( DataRow GrupaRow in TabelaGrupe.Rows)
2
2088
by: Darrel | last post by:
I have the hierarchical menu structure for my site stored in an XML file. I have a page where a person can select from a list of all pages from a dropDownList. I'd like the list to echo the visual hierarchy of the menu. So, I'd like it to look like this: Home - Secondary - Secondary - - Tertiary
4
12828
by: J.B. | last post by:
Hi Can anybody show me how to loop all treeview nodes ini vb.net. I've been working on this for days but still no result. I got a sample code in vb 6.0, this one works. Private Sub SaveNested( Dim TNode As Node Set TNode = TreeView1.Nodes(1).Roo While Not TNode Is Nothin
2
22020
by: Jack | last post by:
Hello, I am trying use a TreeView with checkboxes. I would like to check more than one node and allow all child nodes of selected nodes to be checked or unchecked with the parent is checked. Thanks in advance for any help, Jack
3
3542
by: jismon | last post by:
Hi, I have one problem when i'm trying to loop thorugh the child nodes in a XML string in JAVA. The first Loop is working but in the child node there i want to loop and get the values but it doesn't change the value. Always print the first child node value. I got the length of the child nodes but ..... Pls see the xml string. I want to print the service class and availabilty in the each flightinfo node. I got he lenth of flightinfo also the...
6
2503
by: SQACSharp | last post by:
I'm using the EnumChildWindows API with an EnumChildWndProc callback to populate the treeview. The output will be something similar to spy+ + How can I specify the parent when adding a new node ?? When adding a new node is there any way to get an handle or something else to be able add the childs to the correct parent ? Thanks!
0
2336
by: Andy | last post by:
Hello all, I have a user getting an error 438, object doesn't support this prop. or method, when I run code to setup the treeview control. I'm using the MSCOMCTRL.OCX, file version: 6.01.9545. In my installer, I'm setting it to always overwrite, btw. Here's my code, maybe I'm doing something that is not compatible with a new version of MSCOMCTRL? If I test with the user's db, all is well on my machine.
0
8182
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8130
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8627
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8579
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8433
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7093
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5540
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1425
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.