Welcome, Guest

Author Topic: Yet, another XML problem  (Read 5104 times)

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Yet, another XML problem
« on: July 27, 2009, 05:57:16 PM »
XML's are just not my thing!
Code: [Select]
<?xml version="1.0" standalone="yes"?>
<System>
  <Body>
    <Name>Sun</Name>
    <Object>Sun</Object>
    <Appearance>Sun</Appearance>
    <Mass>19891000000</Mass>
    <Density>1.40844628708309</Density>
    <Diameter>1392000</Diameter>
    <PositionX>-67885734.9754417</PositionX>
    <PositionY>129233872.55859</PositionY>
    <PositionZ>20395297.0298883</PositionZ>
    <VelocityX>6.1834716256905E-08</VelocityX>
    <VelocityY>-2.6114950594118E-08</VelocityY>
    <VelocityZ>-9.34240494717165E-09</VelocityZ>
    <Settings>gravity=1</Settings>
    <Action>belt=sma:4.519 au, smarange:1.2 au, count:10000, h:0.5
  </Body>
  <Body>
    <Name>Yyrak</Name>
    <Texture>test3.jpg</Texture>
    <Mass>2.729 jupiters</Mass>
    <Diameter>347501.06</Diameter>
    <Orbit>body=Sun</Orbit>
    <Orbit>a=5.3918087 au</Orbit>
    <Orbit>e=0.0014782</Orbit>
    <Orbit>i=1.4829102</Orbit>
    <Orbit>node=209.72</Orbit>
    <Orbit>peri=128.49</Orbit>
    <Settings>timestep=1.00 minute</Settings>
  </Body>
  <Body>
    <Name>Tempest</Name>
    <Object>Earth</Object>
    <Mass>1.173482 earths</Mass>
    <Diameter>23098 km</Diameter>
    <Orbit>body=Sun</Orbit>
    <Orbit>a=0.9934117</Orbit>
    <Orbit>e=0.0189473</Orbit>
    <Orbit>i=0.9764071</Orbit>
    <Orbit>node=100.08</Orbit>
    <Orbit>peri=101.48</Orbit>
    <Settings>focus=Tempest</Settings>
  </Body>
 <Body>
    <Name>Nalipax</Name>
    <Object>Uranus</Object>
    <Mass>13.5892012 earths</Mass>
    <Diameter>1454098 km</Diameter>
    <Orbit>body=Sun</Orbit>
    <Orbit>a=12.141113</Orbit>
    <Orbit>e=0.0448772</Orbit>
    <Orbit>i=0.0183708</Orbit>
    <Orbit>node=23.991</Orbit>
    <Orbit>peri=341.72</Orbit>
  </Body>
 <Body>
    <Name>Xzyrr</Name>
    <Object>Europa</Object>
    <Mass>0.7938 earths</Mass>
    <Diameter>14272 km</Diameter>
    <Orbit>body=Sun</Orbit>
    <Orbit>a=15.34987</Orbit>
    <Orbit>e=0.0934875</Orbit>
    <Orbit>i=1.0013478</Orbit>
    <Orbit>node=344.89</Orbit>
    <Orbit>peri=121.17</Orbit>
  </Body>
</System>

I also tried <Object> as <Appearance>, I also checked for misspells quickly, and didn't find anything. Though, you may still want to check.
« Last Edit: July 27, 2009, 06:17:37 PM by NeutronStar »

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Yet, another XML problem
« Reply #1 on: July 27, 2009, 07:41:49 PM »
What exactly is the problem?

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Yet, another XML problem
« Reply #2 on: July 27, 2009, 08:22:37 PM »
nothing shows up... as usual.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Yet, another XML problem
« Reply #3 on: July 27, 2009, 09:01:14 PM »
Ahh... It was obvious and I missed it:

<Orbit> parameters all need to be on one line separated by semicolons (;).

Code: [Select]
<Orbit>body=Earth ; apogee=358 km ; perigee=349 km ; e=0.0008892 ; i=51.6405 ; node=179.1416 ; peri=50.8416 ; m=309.3534 </Orbit>
Check out Satellites orbiting Earth.xml for a working example.

And from the Sandbox Log.txt file:
"The 'Action' start tag on line 17 does not match the end tag of 'Body'. Line 18, position 5."
(Add a closing </Action> tag.

It should work once you make those changes.

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Yet, another XML problem
« Reply #4 on: July 27, 2009, 09:03:02 PM »
Aha!

monmarfori

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 788
Re: Yet, another XML problem
« Reply #5 on: July 27, 2009, 09:07:06 PM »
Why it causes that problem?

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Yet, another XML problem
« Reply #6 on: July 27, 2009, 09:15:18 PM »
I don't know!?!?!? I'm not a XML wizard or I would have not had this problem. Oh wait. It's cause the program can't understand certain things, and you can only put stuff one way.