Sorry I have press post by error
I have try to translate him in c# but I have a problem how to define a
variable type compatible with IXMLDOMNode In the jscript code they use
"var" but in C# what can I use?
This is on th onload events
My C# code:
XslTransform xslt = new XslTransform();
//Load the stylesheet.
xslt.Load("XSLTFile");
//Create a new XPathDocument and load the XML data to be transformed.
XPathDocument mydata = new XPathDocument("XMLFile");
XmlResolver ter = null;
//Transform the data and send the output to the console.
XmlReader reader = xslt.Transform(mydata, null, ter);
IXMLDOMNode oBookstore =
thisXDocument.DOM.selectSingleNode("/my:myAV");
IXMLDOMNode oBook_dest = oBookstore.selectSingleNode("my:myTIT");
IXMLDOMNode oBook_src = reader; //When I do that VS say that
impossible to convert
oBookstore.replaceChild(oBook_src, oBook_dest);
and the original in jscript is:
//Update the data in the secondary data source, and then
//get a reference to the DOM of the secondary data source.
XDocument.DataObjects.Item("XMLFile").Query();
var XMLFileDOM = XDocument.GetDOM("XMLFile");
//Get the transform that is stored as a secondary data source.
var XSLTFileDOM = XDocument.GetDOM("XSLTFile");
//Transform XMLFile by using the style sheet that is named XSLTFile.
var TransformedDOM = new ActiveXObject("MSXML2.DomDocument.5.0");
TransformedDOM.async = false;
TransformedDOM.validateOnParse = true;
TransformedDOM.loadXML( XMLFileDOM.transformNode(XSLTFileDOM));
//Get a reference to the node in the primary document where you want to
insert
//the secondary data.
var oBookstore = XDocument.DOM.selectSingleNode( "/my:myBookstore" );
var oBooks_Dest = oBookstore.selectSingleNode("my:myBooks");
var oBooks_Src = TransformedDOM.documentElement;
//Replace the node in the primary document with the data from the
//secondary data source.
oBookstore.replaceChild( oBooks_Src, oBooks_Dest );
So if anybody has an idea ?
Thanks