473,395 Members | 1,527 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,395 software developers and data experts.

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

Hi,
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

.....
<page>
<Question></Question>
<Question></Question>
<subquestions></subquestions>
</page>

<page>
<Question></Question>
<Question></Question>
<subquestions></subquestions>
</page>
......

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 1283
jkmyoung
2,057 Expert 2GB
Are you using the XslCompiledTransform Class ?
http://msdn2.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform.aspx

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

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

Similar topics

4
by: Porthos | last post by:
Hi All, I've been working on mining data from a schema file (all attribute data so far) and have come to the point where I need to get information that is contained in tags. For instance,...
4
by: Robert Fentress | last post by:
I'm loading an xml data file and then trying to take a particular node and add it, as html, to an element on my page using inner HTML. The xml is like what is below, with the ... representing...
9
by: AA | last post by:
Hello, I need to extract an element from a xml document something like this <myXml> <Header> <Name/> <LastName/> <Age/> </Head> <Body> <Properties>
2
by: ofuuzo1 | last post by:
Hei, I have the following xml file and I have tried to write xslt to extract only the values of the first "record" node. It does not work. I need some help. I used ---- to represent indent. ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.