CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    74

    work with xml in vb6

    hi,
    i have this xml:

    <?xml version="1.0" standalone="yes"?>
    <DocumentElement>
    <export>
    <operador>administrador</operador>
    <data>4/3/2010</data>
    <hora>16:45:59</hora>
    <codigo>mosca</codigo>
    <ean>DDKD</ean>
    <descricao>0.70X1250X2500E</descricao>
    <movimento>+</movimento>
    <adjudicante />
    <fornecedor_id />
    <cliente_id />
    <id>51</id>
    <id_at>56</id_at>
    <n_serie />
    </export>
    <export>
    <operador>administrador</operador>
    <data>4/3/2010</data>
    <hora>16:46:18</hora>
    <codigo>sapo</codigo>
    <ean>SDFSDFSDFSDF</ean>
    <descricao>0.70X1500X3000NI</descricao>
    <movimento>+</movimento>
    <adjudicante />
    <fornecedor_id />
    <cliente_id />
    <id>52</id>
    <id_at>56</id_at>
    <n_serie />
    </export>
    </DocumentElement>


    i can import the values from the xml using this function:

    if objXML.Load(file.xml) Then

    msgbox = objXML.selectSingleNode("//" & valor & "/descricao").Text

    but i only can see the first data, how can i pass to next record?
    i have tryed this:

    objXML.selectSingleNode("//" & valor & "/hora").childNodes.nextNode

    but this return in same data

    thanks a lot for your help



    end if

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: work with xml in vb6

    Might not be valid. Try this class.
    Attached Files Attached Files
    Last edited by dglienna; April 3rd, 2010 at 02:40 PM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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