By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,222 Members | 1,395 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,222 IT Pros & Developers. It's quick & easy.

apply in-memory .xsd schema to updategram

P: n/a
Below I'm generating an updategram via xslt and currently referencing
schema via
<updg:sync mapping-schema="hpXSD.xsd">

But I would like to LOAD the .xsd schema into memory and APPLY to the
updategram in memory. Tried using XmlValidatingReader but couldn't
get it to work. Thanks

Dim xmlPath As String = "xml/hpXML.xml"
Dim xsltPath As String = "xml/hpXSLT.xslt"
Dim xsdPath As String = "xml/hpXSD.xsd"

'(1) XML object
Dim xmlDoc As XmlDocument = New XmlDocument
Dim root As XmlElement = xmlDoc.DocumentElement

'(2) XSLT object
Dim xslt As XslTransform = New XslTransform

'(3) UPDATEGRAM object
Dim myStringWriter As StringWriter = New StringWriter
xslt.Transform(root.CreateNavigator(), Nothing, myStringWriter,

'(4) SCHEMA object
Dim xmlSchema As XmlDocument
'execute updategram
Dim dbComm As New SqlXmlCommand(g_connString)
dbComm.CommandType = SqlXmlCommandType.UpdateGram
dbComm.CommandText = myStringWriter.ToString
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.