[WEBFAQ002]
How to Load Plot Data Over Internet?


The plot component does not currently have built-in capabilities to stream data over the internet.  However, the Internet Explorer browser does support dynamically downloading XML documents and reading them.

In the following example, we have prepared an XML document from a simple Microsoft Excel Spreadsheet (first column x-data, second column y-data), and an HTML web page using the Microsoft XMLDOM component with VBScript.  Open the web page and click the PLOT button to load and plot the data from the XML document.

Live Link: http://www.iocomp.com/test/plotxmltest.htm


HTML Code:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<title>New Page 1</title>
</head>

<body>

<p>
<object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1">

</object>
</p>
<input type="button" value="Plot" name="PlotButton">
<script LANGUAGE="VBScript">
<!--
Sub PlotButton_OnClick()
Dim x
Dim MyXMLDom
Dim Rows
Dim XValue
Dim YValue

Set MyXMLDom = CreateObject("Microsoft.XMLDOM")
MyXMLDom.async = false '=== sycnchronous load ===
MyXMLDom.Load "http://www.iocomp.com/test/SampleData.xml"

Set Rows = MyXMLDom.selectNodes("//Row")

For x = 0 To (Rows.length - 1)
XValue = Rows.Item(x).childNodes.Item(0).Text
YValue = Rows.Item(x).childNodes.Item(1).Text
iPlotX1.Channel(0).AddXY XValue, YValue
Next
end sub
-->
</script>
</body>

</html>


XML Document:

<?xml version="1.0" ?>
- <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
- <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  <Author>Patrick Carroll</Author>
  <LastAuthor>Patrick Carroll</LastAuthor>
  <Created>2004-03-29T16:17:37Z</Created>
  <LastSaved>2004-03-29T16:19:11Z</LastSaved>
  <Company>Iocomp Software</Company>
  <Version>10.6626</Version>
  </DocumentProperties>
- <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
  <DownloadComponents />
  <LocationOfComponents HRef="file:///\\" />
  </OfficeDocumentSettings>
- <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>9720</WindowHeight>
  <WindowWidth>13275</WindowWidth>
  <WindowTopX>480</WindowTopX>
  <WindowTopY>105</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
  </ExcelWorkbook>
- <Styles>
- <Style ss:ID="Default" ss:Name="Normal">
  <Alignment ss:Vertical="Bottom" />
  <Borders />
  <Font />
  <Interior />
  <NumberFormat />
  <Protection />
  </Style>
  </Styles>
- <Worksheet ss:Name="Sheet1">
- <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="34" x:FullColumns="1" x:FullRows="1">
- <Row ss:Index="2">
- <Cell>
  <Data ss:Type="Number">0.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">25.24</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">1.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">3.254</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">2.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">10.25</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">3.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">95.24</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">4.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">75.28</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">5.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">66.24</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">6.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">85.14</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">7.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">52.78</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">8.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">62.88</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">9.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">24.52</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">10.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">52.11</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">11.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">62.25</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">12.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">85.3</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">13.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">84.25</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">14.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">78.36</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">15.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">82.55</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">16.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">12.25</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">17.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">24.25</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">18.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">36.58</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">19.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">44.58</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">20.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">63.58</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">21.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">52.36</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">22.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">20.33</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">23.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">78.88</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">24.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">45.95</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">25.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">63.58</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">26.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">11.25</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">27.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">10.22</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">28.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">5.88</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">29.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">50.55</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">30.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">47.8</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">31.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">36.5</Data>
  </Cell>
  </Row>
- <Row>
- <Cell>
  <Data ss:Type="Number">32.01</Data>
  </Cell>
- <Cell>
  <Data ss:Type="Number">22.5</Data>
  </Cell>
  </Row>
  </Table>
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  <Selected />
- <Panes>
- <Pane>
  <Number>3</Number>
  <ActiveRow>34</ActiveRow>
  <ActiveCol>1</ActiveCol>
  </Pane>
  </Panes>
  <ProtectObjects>False</ProtectObjects>
  <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
  </Worksheet>
- <Worksheet ss:Name="Sheet2">
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  <ProtectObjects>False</ProtectObjects>
  <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
  </Worksheet>
- <Worksheet ss:Name="Sheet3">
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  <ProtectObjects>False</ProtectObjects>
  <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
  </Worksheet>
  </Workbook>

Copyright 1998-2007 Iocomp Software Incorporated. Iocomp and the Iocomp Logo are registered trademarks of Iocomp Software Inc. All other trademarks are registered by their respective owners.