472,125 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Extracting an Element from an XML and aapy XSLT on it...

I need some thing like this.
I have an XML file and it contain some elements(tag) with a proper hierarchy...

In that XML a particular element <page> contain some child node element like below



I need to extract this page element dynamically from this XML file and want to apply XSLT on it and want to display the resultant HTML file in the browser..

when I click on the button placed on my web page it would fetch the information from the XML file and apply XSLT on it and pass the generated HTML source to the page on which i have placed a button...

My programing background is .NET and the language i m using is VB.NET
XML Version 1.0
XSLT Version 1.0

please help me...ASAP
Aug 8 '07 #1
1 1236
2,057 Expert 2GB
Are you using the XslCompiledTransform Class ?

Also, can you run the transformation on the entire page, but simply set up the XSLT to selectively apply on the specified nodes?

Eg, have a root template:
Expand|Select|Wrap|Line Numbers
  1. <xsl:template match="/">
  2. <html>
  3. <head/>
  4. <body>
  5. <xsl:apply-templates select="//page"> <!-- only run transformation on page elements -->
  6. </body>
  7. </html>
  8. </xsl:template>
Aug 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Porthos | last post: by
4 posts views Thread by Robert Fentress | 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.