XSLT transform XmlDocument to XmlDocument?

I just want to make a transformation on the fly, without having to save 
the XML document to a file before or after the transformation. I don't 
find any examples of this.

I see that the XslTranform.Transform() method can return an XmlReader, 
but how can that reader be converted to an XmlDocument object?

Big thanks,

Gustaf
0
3/24/2005 2:43:54 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
825 Views

Similar Articles

[PageSpeed] 35


Gustaf Liljegren wrote:

> I just want to make a transformation on the fly, without having to save 
> the XML document to a file before or after the transformation. I don't 
> find any examples of this.

See
<http://groups-beta.google.com/group/microsoft.public.dotnet.xml/browse_frm/thread/149c1952ac5b591e/7ffd2d20169ca44b?q=xsltransform+xmlreader+xmldocument+group:microsoft.public.dotnet.xml&rnum=2#7ffd2d20169ca44b>


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
3/24/2005 2:55:46 PM
Reply:

Similar Artilces:

switch off transforming number into date
How do I switch off that autocomplete or autoformat or whatever the name of that feature, which transform a decimal number like 12.42 into marcian-looking date like Dec.42 ? It does it at random in some cells These cells may have been formatted as a date in a previous set up. One way to avoid this is to format all as numbers or general. General format will still convert for instance 12/10/23 as a date but it should keep 12.42 as a number. Greetings from New Zealand "aa" <aa@microsoft.com> wrote in message news:%2323$vYzhKHA.5604@TK2MSFTNGP04.phx.gbl... &g...

Transforming a col of text strings to hyperlinks
I have a column with various internet hyperlinks. However for som reason they are stored in the column as ordinary text strings. Is ther a way of transforming all the strings to hyperlinks -- Krelle ----------------------------------------------------------------------- Kreller's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1163 View this thread: http://www.excelforum.com/showthread.php?threadid=27047 Kreller Manually..........select the column of strings then in active cell hit F2 and ENTER. Just keep F2'ing and ENTER'ing until you reach the bottom...

How xslt
Hi all, I have one xml doc like this <test> <orders> <order id='111' typeid='1'> <amount>300</amount> </order> <order id='112' typeid='2'> <amount>300</amount> </order> </orders> <types> <type id='1'> <name>toy</name> </type> <type id='2'> <name>food</name> </type> </types> </test> I want to use xslt to transform it into a new xml -- <test> <orders> <orde...

Possible to include other tags in a XSLT file?
Is it possible to include addition tags in a XSLT file, that the XSLT processor will, for all practical purposes, ignore? What I'm looking to do is to include a section to contain information regarding what parameters the XSLT file is expecting. Then my program can retrieve the information from the style sheet and prompt the user for the necessary parameters. I'm envisioning the section would be something like this: <myParameters> <Param name="City" prompt="City to search for" /> <Param name="State" prompt...

XSLT query
Hi I am using XSLT to transfor XML to HTML. I have an XSLT variable , $PAGELINK. I need to specify this value as an href attribute value of <a> tag. something like <a href = $PAGELINK> Click me for new page </a>. This is not working for me. $PAGELINK is treated as a text by XSLT engine. I request your help to do this. Thanks Srinivas. Cnu wrote: > I am using XSLT to transfor XML to HTML. > > I have an XSLT variable , $PAGELINK. I need to specify this value as > an href attribute value of <a> tag. > > something like <a href = $PAGELINK&g...

XSLT Doubt
Is it possible to transform Two XML documents at once using XSLT? -- Regards, Prashant C "Prashant C" <PrashantC@discussions.microsoft.com> wrote in message news:4927C455-11C2-46B5-BC51-B8AD21E2B7C0@microsoft.com... > Is it possible to transform Two XML documents at once using XSLT? Yes. Cheers, Dimitre Novatchev ...

XSLT with Database
Hi All, Is it possible to query database in XSLT? or pass value to XSLT through C# or VB.NET -- Regards, Prashant C Prashant C wrote: > Is it possible to query database in XSLT? or pass value to XSLT through C# > or VB.NET You have three options: 1) global parameters in the stylesheet e.g. <xsl:param name="param-name"/> which you can set with C# or VB.NET code before you run a transformation, see <URL:http://msdn2.microsoft.com/en-us/library/System.Xml.Xsl.XsltArgumentList.AddParam.aspx> 2) extension "script" coded in VB.NET or C# or JScr...

New to XSLT and can't select even the first node... Any Help?
Hey, brand new to XSL and XSLT. I've downloaded an evaluation copy of XML Spy to debug my transformation, but I can't get to frist base. Can anyone help my get straightened out? My XSLT is: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" /> <xsl:template match="/"> <xsl:for-each select="DataSet_Studio_Appt_Dates/Studio_Appt_Date_Times"> <ItWorked>YEAH</ItWorked> </xsl:for-each> </xsl:t...

XSLT Development Tools?
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about the development environment or recommend me some other that you know. XML IDE's - http://xslt-process.sourceforge.net - http://www.mentattech.com/themes/mentat/alchemist/index.html Regards, Teksure If you're willing to try Beta software there is also an XSL debugger included in Visual Studio 2005 Professional and above which gives you the ultimate debugging experience which is stepping...

XSLT validation
Reposting since this forum might be more appropriate for my question. I have written a simple piece of code in C# that takes a xml file as input, applies a xsl transform and outputs a xml file. I want to validate my output xml file against the xsl file to verify that the output is as expected. How can i do this? Thanks in advance! KL wrote: > I have written a simple piece of code in C# that takes a xml file as input, > applies a xsl transform and outputs a xml file. > > I want to validate my output xml file against the xsl file to verify that > the output is as exp...

New to xml
I'm trying to write my xsl to display an unordered list fromt the xml file where location is equal to top: <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/index.aspx" title="Home" location="top"> <siteMapNode url="~/about_us/index.aspx" title="About Us" location="top" > <siteMapNode url="~/about_us/mediaroom.aspx" title="Media Room" /> <siteMapNode url="~/about_us/awards.aspx" title="Awards" /> <siteMapNo...

XSLT reference?
Once, I happened on a fairly complete set of xsl: language element docs in VS.2003. I can't find it again - can anyone tell me how to navigate to it from either the Contents or the Index? -- www.midnightbeach.com In the index, select no filter and type in XSLT -- Of all words of tongue and pen, the saddest are: "It might have been" Bill.Richards @ greyskin .co .uk http://greyskin.co.uk "Jon Shemitz" wrote: > Once, I happened on a fairly complete set of xsl: language element > docs in VS.2003. I can't find it again - can anyone tell me how to > na...

Date format in xslt
Hi, How to convert date format from MM/dd/yyyy to yyyyMMdd in the XSLT. Is there any method to convert. I am getting date in the XML as string. Plx response on the same group. Thanks in advance Sandy Sandeep Singh wrote: > How to convert date format from MM/dd/yyyy to yyyyMMdd in the XSLT. > Is there any method to convert. > I am getting date in the XML as string. Use string functions like substring-after and substring-before to extract the parts and concatenate them as needed. If you are using MSXML 4/5/6 or .NET XslCompiledTransform then for output formatting you can als...

XSLT Optimization
Hopefully, someone could point me in the right direction. I have we services that takes a DataSet object and Transforms it into pre-defined XSD (outside of my organization's control). I hav successfully done everything, now I am at a point where I want t verify that my XSLT logic is optimized. Since I am new to XSLT codin logic, I want to make sure that my transformation from DataSet to ne XML format is optimal. Basically, I want to find out any resources (website, books, etc.) tha you would highly recommend. There are alot of books out there, but wanted to "cut through the chase&...

XSLT Question
Hi, I'm using .NET Framework 1.1 XSLT. Can anyone tell me why this works: <xsl:for-each select="$somenodelist"> <xsl:if test="ext:CheckCondition (@condition)">Bla</xsl:if> </xsl:for-each> But the following doesn't produce the same results - it behaves as if CheckCondition (a custom function that returns System.Boolean) would _always_ return true: <xsl:for-each select="$somenodelist [ext:CheckCondition (@condition)]"> Bla </xsl:for-each> What's the point of the square brackets then ... I thought it would be &q...

Xslt problem
I have a xlst and xml file and i am trying to recreate this line of html <td height="127" background="images/greggs/montages/montage_final_2.jpg"></td> the xml is <Montage>images/greggs/montages/montage_final_2.jpg</Montage> But i dont know how to use the xsl attribute for background image. Anyone know Thanks I think this is what you are after <td> <xsl:attribute name="background"><xsl:value-of select="Montage"/></xsl:attribute><xsl:attribute name="height">127</xsl:attribute>...

Simple XSLT Question?
Hello all, I have a XML as below: ****************** <BLOCK> <ROW1> <A>1</A> <B>2</B> </ROW1> <ROW2> <A>9</A> <B>3</B> <C>4</C> </ROW2> <ROW3> <ROW31> <A>5</A> <D>6</D> <E>7</E> </ROW31> </ROW3> </BLOCK> ****************** with which I want to apply 2 rules: 1) Move "ROW3" up and bring the element "ROW2" down. 2) Change the element name "ROW2" to "order&quo...

XSLT problem.
The following stylesheet doesn't produce the expected results, (the original xml document is below). All I get is: <html> <title></title> <body></body> </html> <?xml version="1.0"?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method = "html" encoding="UTF-8" /> <xsl:template match="/"> <html> <title> <xsl:apply-templates select = "title" /> </title> <body> ...

[ANN] XML/XSLT Editor
We are glad to announce the availability of EditiX 2.0. EditiX is a cross-platform and easy to use XML / XSLT Editor and Debugger designed to help web authors and application programmers take advantage of the latest XML and XML-related technologies such as XSLT, XSL-FO, DocBook, SVG or various XML schemas. Summary of EditiX : EditiX has an XSLT debugger and an XML Differencing support. It provides users with an extensive range of XML functionality within a refined IDE that guides you with intelligent entry helpers. The user can manage remote files from FTP, WebDAV or from an archive file...

XSLT logic
Hi, I am new to XSLT, trying to fix a bug in somebody else's XSL transformer [it is XSLT1.x code, part of Cocoon2.0 app]. The logic of the code goes like that (in all cases filling in one XML structure mystruct): .... <xml:if (condition1) <mystruct>..block1..</mystruct> </xml:if> <mystruct>..block2..</mystruct> <xml:if (condition3) <mystruct>..block3..</mystruct> </xml:if> ..... Does it seem fishy to you (no "else" or "choose/when/otherwise") ? I am trying to understand when block2 is executed and wheth...

Xml & Transform
I need to know how to perform the following: I have a dataset with some data in it and I want to use the datasets GetXml() method and then use a helper stylesheet (xsl document) that formats the xml into a new xml document (the xsl doc added new tags and such). Any clue how to do such a thing in ASP.Net ? First you need to load the stylesheet into an XslTransform object. Then you can initialize an XmlDataDocument from the DataSet and then execute the trnasformation as shown in the framework docs [0]. However, if performance is an issue the better approach may be to load the Xml data fr...

XSLT Help !
Hello, I have a XML like this below: ***************** <?xml version="1.0"?> <root> <row id="1" fname="Dan" lname="Wahlin"/> <row id="2" fname="Heedy" lname="Wahlin"/> <row id="3" fname="Danny" lname="Wahlin"/> <row id="4" fname="Jeffery" lname="Wahlin"/> </root> ******************** and I need it to be converted to this format. **************** <?xml version="1.0"?> <root> <row> <id>1<...

XML Transform Problem
I am trying to transform an xml document using an xsl document into HTML. I am getting the following error: "There are multiple root elements in the output XML." So I had the contents of the loaded xml document written out on screen - copied it and placed the contents in a physical file and saved it. I then created a simple HTML page with javascript and loaded the xml doc and the xsl doc I've been using - and javascript with the XMLDOM object it transforms just fine. I've ran both the xml and xsl documents in a browser and they are well formed. I am baffled. Any c...

Saving XmlDocument with Danish Encoding????
Hi, I'm trying to update a vbproj xml file programatically, but when I try to open the updated vbproj file in Vs.Net, all entries ("Files") with danish chars are wrong. How do I force the XmlDocument.Save to encode to Danish chars ('ISO-8859-1')? Thanks in advance. M O J O Hi MOJO, First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to save the xml document to a file which is encoded with ISO-8859-1 format. If there is any misunderstanding, please feel free to let me know. We can see that ...

XSLT from XSD
Is there a way to create a XSLT style sheett from XML document or from XSD schema? RS wrote: > Is there a way to create a XSLT style sheett from XML document or from XSD > schema? It's like asking can I generate C# program from my CSV file. Yes, you can, provided you know how to generate XSLT and what that XSLT should accomplish. -- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com ...