source: 1dwg/trunk/archives/2007-12-13 A_Nelson/extractsasXML.ipf @ 7

Last change on this file since 7 was 7, checked in by prjemian, 13 years ago

use trunk,tags,branches

File size: 1.3 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2Function loadsasXML(filename)
3String filename
4variable fileID
5
6fileID = xmlopenfile(filename)
7
8xmlwavefmxpath(fileID, "//Q","","")
9wave/t M_xmlcontent
10
11//if you are tabular instead of vector
12if(dimsize(M_xmlcontent,1) > dimsize(M_xmlcontent,0))
13        matrixtranspose M_xmlcontent
14endif
15
16make/o/d/n=(dimsize(M_xmlcontent,0)) qq,II,Idev,Qdev,Qmean,shadowfactor
17
18qq = str2num(M_xmlcontent[p][0])
19
20xmlwavefmxpath(fileID, "//I","","")
21if(dimsize(M_xmlcontent,1) > dimsize(M_xmlcontent,0))
22        matrixtranspose M_xmlcontent
23endif
24II = str2num(M_xmlcontent)
25
26xmlwavefmxpath(fileID, "//Idev","","")
27if(dimsize(M_xmlcontent,1) > dimsize(M_xmlcontent,0))
28        matrixtranspose M_xmlcontent
29endif
30Idev = str2num(M_xmlcontent)
31
32xmlwavefmxpath(fileID, "//Qdev","","")
33if(dimsize(M_xmlcontent,1) > dimsize(M_xmlcontent,0))
34        matrixtranspose M_xmlcontent
35endif
36Qdev = str2num(M_xmlcontent)
37
38xmlwavefmxpath(fileID, "//Qmean","","")
39if(dimsize(M_xmlcontent,1) > dimsize(M_xmlcontent,0))
40        matrixtranspose M_xmlcontent
41endif
42Qmean = str2num(M_xmlcontent)
43
44xmlwavefmxpath(fileID, "//shadowfactor","","")
45if(dimsize(M_xmlcontent,1) > dimsize(M_xmlcontent,0))
46        matrixtranspose M_xmlcontent
47endif
48shadowfactor = str2num(M_xmlcontent)
49
50killwaves/z M_xmlcontent,W_xmlcontentnodes
51
52End
Note: See TracBrowser for help on using the repository browser.