473,574 Members | 2,595 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 1295
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
1585
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
1280
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
4341
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
7814
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
8249
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7826
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
8107
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...
0
6464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5307
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3748
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
3756
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1352
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.