473,666 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML display table using cc

When using CSS to display an XML file as a table, is there a way to
show the element names at the tops of the columns as headers?

For Example :
I have a XML file
<ITEMLIST>
<ITEM>
<NAMEItem1 </ITEM>
<PRICE500 </PRICE>
<QTY10 </QTY>
</ITEM>
<ITEM>
<NAMEItem2 </ITEM>
<PRICE600 </PRICE>
<QTY20 </QTY>
</ITEM>
<ITEM>
<NAMEItem3 </ITEM>
<PRICE700 </PRICE>
<QTY25 </QTY>
</ITEM>
<ITEM>
<NAMEItem4 </ITEM>
<PRICE900 </PRICE>
<QTY90 </QTY>
</ITEM>
</ITEMLIST>

and the output which I want is

------------------------
| | PRICE | QTY |
------------------------
Item1 | 500 | 10 |
------------------------
Item1 | 600 | 20 |
------------------------
Item1 | 700 | 25 |
------------------------
Item1 | 900 | 90 |
------------------------

Nov 28 '07 #1
1 1725
Pradeep schrieb:
I want the header to be
decided by ITEM child elements (in my example its PRICE, and
QTY).....Is there a way to extract this information and display it in
header
Use XPath's name() or local-name() functions.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Nov 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1931
by: Stewart | last post by:
Hi Experts. Please put the code sample below into an html document and take a look at in NN6+. One span should be shown while the other is hidden. Clicking the button should reverse this. However it doesn't. Removing the table structure from around the text fixes it, but I need the table structure (this is very simplified example). Hope someone can provide an alternative?
3
10243
by: shreddie | last post by:
Could anyone assist with the following problem? I'm using JavaScript to hide/show table rows depending on the option selected in radio buttons. The script works fine in IE but in Firefox the hidden rows take up page space even though their content is not visible. I have extracted the necessary code as shown below: ************************************************************************
0
1742
by: yatharth | last post by:
Hi Well i tell you the situation , i am having the configsection settings like below. what i need to do is to display the sections automatically when i add new section name. after this the all section settings coresponding to section name will
18
3338
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those columns, "scode" and "sname", as 1 column (if not possible then 2 columns will be fine) in the listbox. Can the listbox display 2 columns information from the dataset and how can I do that? Also, I set the property of the listbox to selectionmode...
1
1927
by: jelumalai | last post by:
I am using display:none with using Table. When show the onClick using javascript. Then it will show, again i will hide, content only hidden, but that table doesn't hide. <script> function tableHide() { var tableID = document.getElementById("TableID"); if (tableID.style.display=="none") { tableID.style.display="block"; } else {
0
8454
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8785
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8560
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6200
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5671
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.