Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Readx,;

Status
Not open for further replies.

kal30

Programmer
Sep 18, 2007
1
0
0
US
I have the following XML:
<?xml version="1.0" encoding="UTF-8" ?>
- <ISBNdb server_time="2007-09-18T20:13:30Z">
- <BookList total_results="235" page_size="10" page_number="1" shown_results="10">
- <BookData book_id="ado_net_and_xml" isbn="0764548492">
<Title>ADO.NET and XML</Title>
<TitleLong>ADO.NET and XML: ASP.NET On The Edge</TitleLong>
<AuthorsText>Gregory A. Beamer,</AuthorsText>
<PublisherText publisher_id="wiley">Wiley</PublisherText>
</BookData>
</BookList>
</ISBNdb>

I am using this code to bind it to the gridview:
oDs.ReadXml(url)
gvBooks.DataMember = "BookData"
gvBooks.DataSource = oDs
gvBooks.DataBind()

I get all the details except for <PublisherText publisher_id="wiley">Wiley</PublisherText> . I do understand that this is an attribute but I am not sure how I will get it.

Can some one please help me.
Thank you
 
Whats the code for the GridView (declarative code). You'll need to bind one of the columns to the xpath "PublisherText/@publisher_id".

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top