G
Guest
I am looking for examples that would illustrate something similar to the
following requirements:
I am building an in-memory xml structure using the following as the setup
and classes to perform this step:
If fileOutput Then
Dim XmlWriter As New XmlTextWriter("D:\QICS_MT\Debug Output\" & _
fileName, System.Text.Encoding.UTF8)
XmlWriterXsdMultiLevel(regexObject, _
elementCollection, _
XmlWriter)
Else
Dim coreStream As New MemoryStream
Dim XmlStreamWriter As New StreamWriter(coreStream,Text.Encoding.UTF8)
Dim XmlWriter As New XmlTextWriter(XmlStreamWriter)
XmlWriterXsdMultiLevel(regexObject, elementCollection, XmlWriter)
End If
If I take the upper branch I can successfully create and write the document
and subsequently I can open the resulting Xml file and validate it against an
external xsd file.
I would like to be able to take the lower branch and create the same xml
structure, yet in this instance I would like to be able to pass the created
xml content to an XmDocument class, so that I can pass and use it elsewhere
in the application.
I am having problems understanding how to use the XmlDocument.Load(Stream)
method, though I believe this is how I should do this. I have not found many
examples of using this method, so I was looking for assistance in that area.
Thanks,
Tim
following requirements:
I am building an in-memory xml structure using the following as the setup
and classes to perform this step:
If fileOutput Then
Dim XmlWriter As New XmlTextWriter("D:\QICS_MT\Debug Output\" & _
fileName, System.Text.Encoding.UTF8)
XmlWriterXsdMultiLevel(regexObject, _
elementCollection, _
XmlWriter)
Else
Dim coreStream As New MemoryStream
Dim XmlStreamWriter As New StreamWriter(coreStream,Text.Encoding.UTF8)
Dim XmlWriter As New XmlTextWriter(XmlStreamWriter)
XmlWriterXsdMultiLevel(regexObject, elementCollection, XmlWriter)
End If
If I take the upper branch I can successfully create and write the document
and subsequently I can open the resulting Xml file and validate it against an
external xsd file.
I would like to be able to take the lower branch and create the same xml
structure, yet in this instance I would like to be able to pass the created
xml content to an XmDocument class, so that I can pass and use it elsewhere
in the application.
I am having problems understanding how to use the XmlDocument.Load(Stream)
method, though I believe this is how I should do this. I have not found many
examples of using this method, so I was looking for assistance in that area.
Thanks,
Tim