473,569 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 1292
jkmyoung
2,057 Recognized Expert Top Contributor
Are you using the XslCompiledTran sform Class ?
http://msdn2.microsoft .com/en-us/library/system.xml.xsl. xslcompiledtran sform.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
1584
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, <tag>My Data Here</tag>. I've tried using the <xsl:value-of select="tag"/> element, but it does not appear to work in schema files. Is this correct? Is...
4
1278
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 eliminated detail: <?xml version="1.0" encoding="iso-8859-1"?> <table> <descriptions> <fielddesc id="1"> ...
9
4339
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
6387
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. Xml: <?xml version="1.0" encoding="UTF-8"?> <OAI-PMH xmlns="http://www.openarchives.....OAI/2.0/OAI-PMH.xsd">...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.