How can I import a Base database from XML?

asked 2015-10-02 05:42:47 +0100

jwktrucker gravatar image

I am playing with a real cool sector of space generator called AstroSynthesis by www.nbos.com . It uses NASA formulas to generate realistic star systems. Great generator beautiful GUI can spend hours exploring star systems. I love it for my Traveler Campaign. The problem is that it does not have a very good data handling system when it comes to searches. Like I want a list of the Planets that have a Gravity between 0.8G and 1.15G or all the Stars that have no Gas Giants.

Well it is a database generator and I can right a Quarry that can find what I am looking for in a database. It can export the data in XML format. So my question is How can I take a XML file and put it into a Quarry able database.

The XML is a lot of entries like this ... <Body ID="{D4B45BEE-585B-40E5-B77F-85FB1B9BEB55}" Name="Nirana" TypeID="Star"> <BodyType>Star</BodyType> <Color>10605311</Color> <LabelColor>16776960</LabelColor> <FontStyle>1</FontStyle> <RenderDistance>30</RenderDistance> <LabelDistance>60</LabelDistance> <RouteDistance>40</RouteDistance> <Spectral>K9V</Spectral> <Radius>0.590169</Radius> <Mass>0.517274</Mass> <Rotation>371.18</Rotation> <Luminosity>0.099546</Luminosity> <ChildPopulation>904394</ChildPopulation> <ChildHabitability>2</ChildHabitability> <BodyCount>39</BodyCount> <PoliticalAffiliation>Gas Giant, Hospitable</PoliticalAffiliation> <SphereInfluenceColor>12632256</SphereInfluenceColor> <SphereInfluenceSize>0.5</SphereInfluenceSize> <RandomSeed>715426068</RandomSeed><CustomFields> <CustomField FieldName="camera-dist" FieldValue="0.546765765271645"/> <CustomField FieldName="camera-lat" FieldValue="72"/> <CustomField FieldName="camera-long" FieldValue="-2"/> </CustomFields><Children> <Body ID="{5CA12C2F-7804-4648-8F03-5E6939B1098F}" Name="Xi Semet" TypeID="Terrestrial"> <Distance>16327834</Distance> <Radius>5458</Radius> <Density>0.6</Density> <Mass>0.375984291905314</Mass> ...

edit retag flag offensive close merge delete