473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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">
....
</updg:sync>

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
xmlDoc.Load(xmlPath)
Dim root As XmlElement = xmlDoc.DocumentElement

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

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

'(4) SCHEMA object
?????
Dim xmlSchema As XmlDocument
xmlSchema.Load(xsdPath)
'execute updategram
Dim dbComm As New SqlXmlCommand(g_connString)
dbComm.CommandType = SqlXmlCommandType.UpdateGram
dbComm.CommandText = myStringWriter.ToString
dbComm.ExecuteNonQuery()
Nov 12 '05 #1
0 1248

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sparko | last post by:
My Xml is as follows; <root> <st id="1"> <rt id="1"> <cr id="1" ca_w="" ca_x="" ca_y="" ca_z="" other attribs> <ct some attribs> <te some attribs /> <te some attribs />
1
by: Daryl | last post by:
Hello I am using apply-templates and would like to pass a parameter to the template using with-param. Using call-template passes the parameter, but when I use apply-templates, the parameter seems...
5
by: david hepworth | last post by:
Hi All I will try to explain my problem. I am wishing to apply a template to the following XML. There are multiple event nodes within the register root node. For each of the event nodes there...
3
by: bjam | last post by:
Help! The apply-templates function is not currently allowing me to select a specific template... eventhough I tried putting a select statement, it does not seem to work??? Can someone help show...
1
by: Christopher Benson-Manica | last post by:
IE 5.0 apparently does not support the apply() method for function objects - the following fails: function foo() { alert( this.length ); } foo.apply( ); Is there a convenient way to add an...
1
by: Trent | last post by:
Hello,everyone. I'm setting a db2 replication environment using UDB version 8.1.5 running on Windows 2000 servers. The source server is on a Windows server with the capture program running while...
3
by: almousawi | last post by:
I am working on a DB2 replication program that used to work. I ran the "warm" capture program to get a cold start and I am running the apply program, but, the apply does not replicate the data. I...
4
by: esmith2112 | last post by:
Having a bear of a time trying to implement replication under 8.2 environment. I've created all of the control structures on both source and target database and can actually see data being staged...
0
by: mdb_1974 | last post by:
Hello I tried to do an initial full refresh but I failed - nothing happens (no error at all). Apply works without errors. Details of my environment: I have the following replication scenario:...
0
by: jobsearch.india02 | last post by:
Hi Friends, Have a successful day! We would like to forward the exciting job opportunities from the below TOP companies.. TATA Consultancy Services | Health Asyst Pvt. Ltd | Cambridge...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.