473,499 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binding xml in grid view with certain nodes and childnodes

1 New Member
I have a xml file. I want to display the nodes and childnodes in my datagrid, i used xmldatasource, but i can read a specific path only. The problem is i should not use dataset and xmldocument. Give me some suggestions

<?xml version="1.0" encoding="utf-8"?>
<newbookingrs>
<bookingid>187250</bookingid>
<bookingstatus>We have received your request. As you did not submit the required payment details, no booking will be held for you. If you would like to go ahead with this request, please [varHref]&gt;click here to provide your payment details now. Otherwise, no further correspondence is required from you.</bookingstatus>
<checkindate>2007-10-25</checkindate>
<checkoutdate>2007-10-26</checkoutdate>
<currencycode></currencycode>
<bookingdetails>
<hotelname>STAMFORD GRAND GLENELG</hotelname>
<hoteladdress>London City in United kingdom</hoteladdress>
<cancellationpolicy>0-4 days prior to arrival = 1 nights accommodation</cancellationpolicy>
<arrivaltime>21</arrivaltime>
<roomtype id="27569" name="City View Room">
<roomconfig id="108128" name="Double" count="1">
<rate amountcharged="-1.00" ratepernight="-1.00" noofnights="1" />
<adultsandchildren email="mandatory@man.com" adults="2" children="0" totaladult="5" totalchildren="0" />
</roomconfig>
<roomconfig id="108127" name="single" count="1">
<rate amountcharged="-1.00" ratepernight="-1.00" noofnights="1" />
<adultsandchildren email="mandatory@man.com" adults="1" children="0" totaladult="5" totalchildren="0" />
</roomconfig>
<roomconfig id="108131" name="Triple - 2 x Double beds" count="1">
<rate amountcharged="-1.00" ratepernight="-1.00" noofnights="1" />
<adultsandchildren email="mandatory@man.com" adults="2" children="0" totaladult="5" totalchildren="0" />
</roomconfig>
<roomconfig id="1454519" name="Bonus Night Offer" count="">
<rate amountcharged="" ratepernight="" noofnights="" />
<adultsandchildren email="" adults="" children="" totaladult="0" totalchildren="0" />
</roomconfig>
</roomtype>
<extraservices>
<service id="0" desc="Meal" typeid="5860" type="BREAKFAST" number="2" numberofnight="1" ratepernight="0" amount="0" />
<service id="-1" desc="Other" typeid="12443" type="AIRPORT PICKUP" number="2" numberofnight="1" ratepernight="0" amount="0" />
</extraservices>
<transactiondetails>
<transactionmethod>MasterCard</transactionmethod>
<transactiondocnumber>5300000000000006</transactiondocnumber>
<categoryid>INT</categoryid>
<currencycode></currencycode>
<bookingdate>2007-05-22</bookingdate>
<grandtotal>-3.00</grandtotal>
<creditcard firstname="dsfa" lastname="asdf" expirydate="09-2009" />
</transactiondetails><hotelrequest value="" />
</bookingdetails>
</newbookingrs


This is the xmlresponse i am getting. Now i want to display a particular nodes and subnodes in my datalist or repeater. This is the overall output i am
getting, but for displaying in repeater i want a particular node only not all (ie) (roomtype,roomconfig,rate and aults)

expected output is
roomtype name="City View Room"
roomconfig name="Double" count="1"
rate amountcharged="-1.00" ratepernight="-1.00" noofnights="1"
adultsandchildren email="mandatory@man.com" adults="2" children="0" totaladult="5" totalchildren="0"


The output has to come like this ie

RoomType Room / Offer Number of rooms Length Of Stay Adults Children Rate/Room
CityViewRoom Double 1 1 1 0 -1
CityViewRoom single 1 1....


like that for all nodes,
May 25 '07 #1
1 1781
subbulakshmi
3 New Member
hi

i want to read data from XMLDocument by using Java Script. replay me if you know .
May 26 '07 #2

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

Similar topics

13
4132
by: kaeli | last post by:
Can anyone explain this to me? It's driving me insane. Save this and run it in IE or Opera and then in Mozilla or Netscape 6+. In IE/Opera, I get the expected 4 alerts. In Mozilla/Netscape, I...
6
3496
by: Nikhil Patel | last post by:
Hi all, Following is a portion of an XML document. I need to remove all nodes that belong to ns0 without deleting their child nodes. So in the following example , I want to delete "ns0:Proposal"...
0
1704
by: damiensawyer | last post by:
Hello all, I'm very new to all of this. I have a theme and a skin (the standard ones). I have a standard master page which is holding a custom ascx which has a treeview in it. Can someone...
1
2312
by: Daniel Rucareanu | last post by:
Hello, Does anybody knows how can you delete, in just one step, not using a loop, a subset of the child nodes of a given DOM parent node? The subset will be continous, so for example, if the...
2
1857
by: npm | last post by:
I'm trying to display XML nodes whose parent node has a certain attribute (or attribute value). I have one code that works in Firefox, but not IE and another code that works in IE, but not Firefox. ...
11
4769
by: npm | last post by:
Hi, I'm trying to add an IF statement to this javascript that will select/display only those xml nodes either with a certain attribute or attribute value. Here's my xml code: <stations>...
0
1709
by: teju | last post by:
Hi all, I am trying to populate tree view from the database. Till two levels i can populate it fine but when it reaches third level it doesn't expand. Below is the code, it has been taken from the...
2
1608
by: David Jackson | last post by:
Hello, I have a TreeView control with "top-level" nodes and "second-level" nodes (probably not the correct terms) as follows: objNode = new TreeNode(); objNode.Text = "2006";...
6
7960
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
0
7007
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...
0
7220
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...
1
6894
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
7388
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...
0
5470
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,...
1
4919
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...
0
4600
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...
0
1427
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 ...
1
665
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.