The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 xml import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ralph_krupke

Germany
1 Posts

Posted - 08/09/2005 :  2:36:59 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: Windows 2000

Hi,

I am seeking to import an xml document by using XMLtoWKS but do get the following error:

xmltowks d:\temp\test.xml;
COM: not an object
general operation failure
#Command Error!

The file content looks as follows:

- <measurement>
<date>1123241049</date>
<sampleid>w129c120p1d</sampleid>
<apparatur />
<sweep>U</sweep>
<measure>I</measure>
<user>Matti</user>
<param />
- <device>
<name>SourceMeter</name>
<control>Standard</control>
<quantity>U</quantity>
<quantity>I</quantity>
<quantity>DeltaU</quantity>
<quantity>DeltaI</quantity>
<i-range>10E-6</i-range>
<u-range>21E+0</u-range>
<nplc>1.00</nplc>
<moving-count>1</moving-count>
<repeat-count>1</repeat-count>
<median-rank>0</median-rank>
<source-type>U</source-type>
</device>
- <quantity>
<item quantity="U" unit="V" fmt="%.3e" />
<item quantity="I" unit="A" fmt="%.3e" />
<item quantity="DeltaU" unit="V" fmt="%.3e" />
<item quantity="DeltaI" unit="A" fmt="%.3e" />
</quantity>
- <data labels="U,I,DeltaU,DeltaI">
<item>-4.643E-5 -3.475E-10 1.370E-5 2.049E-11</item>
<item>4.999E-1 3.503E-8 1.888E-5 2.009E-9</item>
<item>9.994E-1 1.191E-7 2.817E-5 2.743E-9</item>
<item>1.500E+0 2.896E-7 1.818E-5 3.186E-9</item>
<item>2.000E+0 4.902E-7 2.921E-5 5.901E-9</item>
<item>2.500E+0 8.274E-7 6.809E-6 1.967E-8</item>
<item>3.000E+0 1.160E-6 2.416E-5 2.394E-8</item>
<item>3.500E+0 1.510E-6 1.578E-5 9.177E-9</item>
<item>3.999E+0 1.935E-6 3.449E-5 2.935E-8</item>
<item>4.500E+0 2.856E-6 3.419E-5 5.716E-8</item>
</data>
</measurement>

Does anyone knows a solution ?

Thanks in advance,
Ralph

easwar

USA
1965 Posts

Posted - 08/09/2005 :  2:57:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Ralph,

Can you please send
1> your xml file
2> your OC code file
to tech@originlab.com so that we can take a look?

If you do this, please refer to this forum post in your message.

Thanks,

Easwar
OriginLab


Go to Top of Page

easwar

USA
1965 Posts

Posted - 08/10/2005 :  12:15:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Ralph,

You can use the tree object in Origin C to load in any XML file, with code such as:


Tree trLoad;
trLoad.Load("C:\\Temp\\test.xml");
tree_dump(trLoad, "\nContents of my tree:");



The third line above just dumps the entire tree to script window. You could place a break point at this line and then look at the tree in debug view in Code Builder.

Then as long as you know what information is in which branch, you can get the values out of the tree. More information on accessing tree elements can be found in the help file:
Programming Help-> Programming Guide -> Trees and XML.

If possible, please do send some sample XML data files to us so that we can investigate as to how to get the data into Origin in an easier way in future versions.

Easwar
OriginLab



Edited by - easwar on 08/10/2005 12:16:15 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000