471,594 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

apply in-memory .xsd schema to updategram

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
0 1191

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Daryl | last post: by
5 posts views Thread by david hepworth | last post: by
3 posts views Thread by bjam | last post: by
1 post views Thread by Christopher Benson-Manica | last post: by
4 posts views Thread by esmith2112 | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.