Hello owain,
I cant get exactly what you mean
what do you mean from this sentence
Quote:
quote:
My idea has been to have a function in my class called ToXML which returns a System.IO.Stream object and then I can do what I like with it the other end
|
for working with your XML file you should make a
stream for it
like
Code:
FileStream fs = new FileStream("Test.xml", FileMode.OpenOrCreate, FileAccess.ReadWrite);
then you should make a XmlTextWriter object
Code:
System.Xml.XmlTextWriter xtw=new XmlTextWriter(fs,null);
as you see here we should give the constructor a stream object(FileStream)
then you can access this stream through Basestream property of your XmlTextWriter
this baseStream is the same as the stream(or derived classes like FileStream) you declared in XmlTextWriter Constructor,
HtH.
--------------------------------------------
Mehdi.:)