CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Location
    Malaysia
    Posts
    45

    extract from XML

    hi all,
    i have an XML file where the information is stored as given below, now i want to get the information where intakeid = "DF1111" and courseName = "OS"how to do it using Visual Basic 6.0 ?

    <details>
    <intake intakeid ="DF1111" teacher_id ="SGN" startingweek="12/31/2001" endingweek="4/8/2002" courseName = "MT"></intake>
    <intake intakeid ="DF1111" teacher_id ="RK" startingweek="12/31/2001" endingweek="4/8/2002" courseName = "OS"></intake>
    <intake intakeid ="DF1111" teacher_id ="SN" startingweek="12/31/2001" endingweek="4/8/2002" courseName = "CSA"></intake>
    </details>


    Thanks
    waqas
    work, work and only work!!

  2. #2
    Join Date
    Aug 2001
    Location
    Russia, Moscow
    Posts
    26
    Hi
    It is in JS, just change syntax.

    xml = new ActiveXObject("Msxml2.DOMDocument");
    xml.load(urlOrFile);
    nodeList = xml.selectNodes('//details/intake[intaked="DF1111" and courseName = "OS"]');


    nodeList.length - count of nodes
    nodeList.item(i) - node
    Denis.

  3. #3
    Join Date
    Jun 2002
    Location
    Malaysia
    Posts
    45
    Thanks dkar...
    work, work and only work!!

  4. #4
    Join Date
    Jun 2002
    Location
    Malaysia
    Posts
    45
    hi dKar,

    can u please help me with same thing above in Java using sax or dom....?

    thanks
    waqas
    work, work and only work!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured