Newbie Question 2 - XML Output to File

hi all,



this might actually be a dumbass java question: in the load test sampple source, a converted format (like obj) is output to the system console like so:

btx.sendBinarytoXML(new ByteArrayInputStream(BO.toByteArray()),new OutputStreamWriter(System.out));



so how do i write that out to a disk file instead? like i said, prolly a dumbass java question.

i've seen talk in the forums about making external exporters for various formats, and having jME only support reading its native format, and concentrate on doing that really well. makes sense to me. so do these exporters exist? i havn't found them in cvs, so perhaps they have not yet been released?

at any rate, i'd like to be able to start maintaining my models in the native format, and i'd also just like to see the complete XML of my files. oh, and also, i havn't found a spec for the xml format, if anyone could point me to that resource if it exists.

thanks!

J

btx.sendBinarytoXML(new ByteArrayInputStream(BO.toByteArray()),new FileWriter("thefile.xml"));



I think it's called FileWrtier...

No external exporters exist, although I think DarkProphet wrote one for Max that even did animation (some time ago).

There isn't a defined XML format specification, but if you look at a few XML files you'll pick up pretty fast how it's suppose to look. The great thing about XML is that it's human readable. If you run into any specific querstions, ask here.

thanks again for your quick reply.



indeed the nice thing about XML is it’s legibility. What i would eventually like to do is write a converter for valve’s SMD format and then cook up a class that manages the reference model and it’s animation sequences, WITHOUT having to compile into a single file. the ultimate goal, given a fixed skeletal structure applied to an arbitrary mesh, is to allow players to create, save, and share animation sequences “in-game”.



until i make an in-game JointController editor, i’ll build up a library of sequences in MilkShape, export SMDs, convert to jME XML, and manage the sharing and loading processes. then i’ll tackle making a keyframe editor. so inherent in this is a multi-user element. are there any multi-user efforts in the works?



so does this sound reasonable? am i missing something in jME that already allows for this type of functionality?



thanks



j

btw i’m really grooving on what you all have accomplished, and i hope i might contribute, in at least a small way!


WITHOUT having to compile into a single file

So you'r not gonna convert it to .jme first? That's how every other model format in jME is loaded anyway.
So you'r not gonna convert it to .jme first?


well, funny you should mention that, the idea is that many things in-game will be player-scriptable - for example, enable the creation of character behaviors with a java based scripting language - so i was thinking that joint animations would be maintained as readable text as well.

however, and PLEASE correct me if i'm wrong: don't the loaders covert the binary to a text XML, which is then parsed and a node returned? i thought i'd be just skipping the binary step, and directly reading the XML (though it is very likely i am wrong about that).

again i'm totally new at jME and am very interested in knowing the "right" ways to do things with it.

j