Results 1 to 6 of 6

Thread: vb6 using msxml 4.0

  1. #1

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    vb6 using msxml 4.0

    <Values>
    <Analog_Input1>61</Analog_Input1>
    <Analog_Input2>175</Analog_Input2>
    <Analog_Input3>53</Analog_Input3>
    <Analog_Input4>22</Analog_Input4>
    <Analog_Input5>61</Analog_Input5>
    <Analog_Input6>127</Analog_Input6>
    <Analog_Input7>127</Analog_Input7>
    <Experimenter>User</Experimenter>
    <Rate>50 miliseconds</Rate>
    <Start_Time>2/15/2007 2:12:24 PM</Start_Time>
    <End_Time>2/15/2007 2:12:25 PM</End_Time>
    <Quantity_of_data>7</Quantity_of_data>
    </Values>
    ***********************************************
    above is the output by using MSXML 4.0.
    how to use the xml parser to remove the tag?
    thanks.....

  2. #2

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: vb6 using msxml 4.0

    is there any example?
    i search so many in internet but all the result is just like what i have done (with tag).....

  3. #3
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: vb6 using msxml 4.0

    Have you tried the innertext property?

    And what tags do you want to remove? Or what should have been the output based on xml you posted?

  4. #4

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: vb6 using msxml 4.0

    No Analog Input
    1 61
    1 75
    3 53
    4 22
    5 61
    6 127
    7 127

    Experimenter: User
    Rate: 50 miliseconds
    Start of Time: 2/15/2007 2:12:24 PM
    End of Time: 2/15/2007 2:12:25 PM
    Quantity of data: 7

    *************************************************
    can make the xml file look like that? (without TAG).....
    my lecturer said can use XML parser to do that,
    but i can't search for such information of XML parser.....

  5. #5

    Thread Starter
    Lively Member chxxangie's Avatar
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    79

    Re: vb6 using msxml 4.0

    i think need to write a style sheet.....how to do it in VB?

  6. #6
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: vb6 using msxml 4.0

    Sorry wasn't able to reply. If your gonna consider that step you'll do XSLT instead of CSS if you meant CSS when you mentioned style sheets.

    Main page: http://www.w3schools.com/default.asp
    XSLT: http://www.w3schools.com/xsl/default.asp
    DTD: http://www.w3schools.com/dtd/default.asp

    In effect your gonna update (or create your own copy of) the xml to include the XSL declaration as well as the XSL style sheet itself. You can then use the webbrowser control to display the text, I emphasize "for display"... but in order to access the data in the elements individually your gonna end up doing so through HTML DOM... in effect you just shifted access method from XML to HTML.

    I suggest instead you stick with MSXML (skip HTML DOM, webbrowser control and style sheet), and use XPath or getElementsBy__ methods to isolate individual elements or collection of elements.

    XPath: http://www.w3schools.com/xpath/default.asp

    Some samples using XPath or getElementsBy___
    http://www.vbforums.com/showthread.p...ighlight=xpath
    http://www.vbforums.com/showthread.p...ighlight=xpath
    http://www.vbforums.com/showthread.p...ighlight=xpath
    http://www.vbforums.com/showthread.p...ight=parse+xml
    Last edited by leinad31; Feb 22nd, 2007 at 10:24 AM.

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