Hi everybody,
Here I am doing a project to generate flash line graphs using xml data. I prepared every thing ready for this, But only problem I am facing since so many days is from the node values in xml. My mind was blocked with this. I want to read the xml node values into the array in action script. Any help will be greatly appreciated. Here is the code:
[code=actionscri pt]
var fillDataArray=n ew Array();
var productInfoArra y=new Array();
var headingXArray=n ew Array();
function ck() {
/* This is the array to be read the values*/
fillDataArray = [[], [], [], [], []];
productInfoArra y = ['OPEN', 'HIGH', 'LOW', 'CLOSE'];
headingXArray = ['25-06-07', '26-06-07', '27-06-07', '28-06-07', '29-06-07'];
myGraph.init(fi llDataArray, headingXArray, productInfoArra y);
}
[/code]
[code=xml]
<?xml version="1.0" encoding="utf-8"?>
<CMTICKERDATA >
<RECORD>
<CANVASBGCOLOR> E3ECFB</CANVASBGCOLOR>
<SYMBOL>CONCO R</SYMBOL>
<SERIES>EQ</SERIES>
<OPEN>2279</OPEN>
<HIGH>2675</HIGH>
<LOW>2126.8</LOW>
<CLOSE>2206.1 5</CLOSE>
<LAST>2200</LAST>
<PREVCLOSE>2283 .65</PREVCLOSE>
<TOTTRDQTY>1249 8</TOTTRDQTY>
<TOTTRDVAL>2812 4001.55</TOTTRDVAL>
<TIMESTAMP>1-JUN-2007</TIMESTAMP>
<DELIVERQTY>881 3</DELIVERQTY>
</RECORD>
<RECORD>
<SYMBOL>CONCO R</SYMBOL>
<SERIES>EQ</SERIES>
<OPEN>2210</OPEN>
<HIGH>2265</HIGH>
<LOW>2151.55</LOW>
<CLOSE>2172.7 5</CLOSE>
<LAST>2170</LAST>
<PREVCLOSE>2206 .15</PREVCLOSE>
<TOTTRDQTY>3734 </TOTTRDQTY>
<TOTTRDVAL>8288 918.55</TOTTRDVAL>
<TIMESTAMP>4-JUN-2007</TIMESTAMP>
<DELIVERQTY>214 5</DELIVERQTY>
</RECORD>
</CMTICKERDATA>
[/code]
Here I am doing a project to generate flash line graphs using xml data. I prepared every thing ready for this, But only problem I am facing since so many days is from the node values in xml. My mind was blocked with this. I want to read the xml node values into the array in action script. Any help will be greatly appreciated. Here is the code:
[code=actionscri pt]
var fillDataArray=n ew Array();
var productInfoArra y=new Array();
var headingXArray=n ew Array();
function ck() {
/* This is the array to be read the values*/
fillDataArray = [[], [], [], [], []];
productInfoArra y = ['OPEN', 'HIGH', 'LOW', 'CLOSE'];
headingXArray = ['25-06-07', '26-06-07', '27-06-07', '28-06-07', '29-06-07'];
myGraph.init(fi llDataArray, headingXArray, productInfoArra y);
}
[/code]
[code=xml]
<?xml version="1.0" encoding="utf-8"?>
<CMTICKERDATA >
<RECORD>
<CANVASBGCOLOR> E3ECFB</CANVASBGCOLOR>
<SYMBOL>CONCO R</SYMBOL>
<SERIES>EQ</SERIES>
<OPEN>2279</OPEN>
<HIGH>2675</HIGH>
<LOW>2126.8</LOW>
<CLOSE>2206.1 5</CLOSE>
<LAST>2200</LAST>
<PREVCLOSE>2283 .65</PREVCLOSE>
<TOTTRDQTY>1249 8</TOTTRDQTY>
<TOTTRDVAL>2812 4001.55</TOTTRDVAL>
<TIMESTAMP>1-JUN-2007</TIMESTAMP>
<DELIVERQTY>881 3</DELIVERQTY>
</RECORD>
<RECORD>
<SYMBOL>CONCO R</SYMBOL>
<SERIES>EQ</SERIES>
<OPEN>2210</OPEN>
<HIGH>2265</HIGH>
<LOW>2151.55</LOW>
<CLOSE>2172.7 5</CLOSE>
<LAST>2170</LAST>
<PREVCLOSE>2206 .15</PREVCLOSE>
<TOTTRDQTY>3734 </TOTTRDQTY>
<TOTTRDVAL>8288 918.55</TOTTRDVAL>
<TIMESTAMP>4-JUN-2007</TIMESTAMP>
<DELIVERQTY>214 5</DELIVERQTY>
</RECORD>
</CMTICKERDATA>
[/code]
Comment