Posted 18 years ago
by Jeff Cohen
I have two .xml definition files, and one transitions to the other with the typical <State Filename="child.xml"> tag. The syntax coloring works great in both the parent and child language sections of the document.
But I'd prefer to embed my dynamic language .xml files into my executable instead of deploying physical files. Using the LoadFromXml() overload that takes a stream works great for the parent language, but using the <State Filename="child.xml"> tag won't work if I'm loading from streams (i.e., how would it know which stream I'm referring to?)
So, I thought maybe I'll have to extract my embedded .xml files to disk a runtime with an encoding value, and then read them from disk instead - but again, how would I specify the encoding value in the <State> tag?
Or, could I extract the files without encoding, load the definitions, and then immediately delete the .xml files on disk?
I also see the <StateTransition> tag and I'm wondering if I should be using that instead anyway? So I'm wondering if I'm missing an important concept here in all of this...?
Any tips?
Thanks!
Jeff
But I'd prefer to embed my dynamic language .xml files into my executable instead of deploying physical files. Using the LoadFromXml() overload that takes a stream works great for the parent language, but using the <State Filename="child.xml"> tag won't work if I'm loading from streams (i.e., how would it know which stream I'm referring to?)
So, I thought maybe I'll have to extract my embedded .xml files to disk a runtime with an encoding value, and then read them from disk instead - but again, how would I specify the encoding value in the <State> tag?
Or, could I extract the files without encoding, load the definitions, and then immediately delete the .xml files on disk?
I also see the <StateTransition> tag and I'm wondering if I should be using that instead anyway? So I'm wondering if I'm missing an important concept here in all of this...?
Any tips?
Thanks!
Jeff