|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XML PROBLEM HELP NEEDED URGENTLYI have a product product_name=taj Mahal product_id=111 i and different users will be putting reviews title and review description. this is the following xml file i have make <reviews> <Product> <id> 111 </id> <review_title>It is good book</review_title> <review_content>I have read the book it is a good book</review_content> </Product> <Product> <id>111</id> <review_title> good book</review_title> <review_content> the book it is a good book</review_content> </Product> <Product> <id>112</id> <review_title> good book</review_title> <review_content> the book it is a good book</review_content> </Product> </reviews> plz review it if not approperiate just tell me how to do It Hi guaravkg
Not sure what the problem is... But I would suggest the following changes to the xml file. I'm taking for granted that a product can be reviewed more than once. <products> <product> <id></id> <reviews> <review> <review_title> <review_description> </review> </reviews> </product> </products> This provides a more normalised view of the data. AKA Many products. 1 product can have more than one review. Hope this is what you're needing. gauravkg via DotNetMonster.com wrote: Show quoteHide quote > Hi i have a problem > > I have a product > > product_name=taj Mahal product_id=111 > > i and different users will be putting reviews title and review description. > > this is the following xml file i have make > <reviews> > > > > <Product> > > <id> > > 111 > > </id> > > <review_title>It is good book</review_title> > > <review_content>I have read the book it is a good book</review_content> > > </Product> > > <Product> > > <id>111</id> > > <review_title> good book</review_title> > > <review_content> the book it is a good book</review_content> > > </Product> > > <Product> > > <id>112</id> > > <review_title> good book</review_title> > > <review_content> the book it is a good book</review_content> > > </Product> > > </reviews> > > > > plz review it if not approperiate just tell me how to do It > thanks for the help ,u judge the problem rightly.in this like i
<products> > <product> <review>> <id>11</id> > <reviews> > <review> > <review_title>It is good product > <review_description>i have tried it .It isa good product > </review> > <review_title>It is fabolus product now can u tell me xsl format to reterive the row where product id=11. i> <review_description>i have not tried it > </review> > </reviews> > </product> ></products> > really appreciate ur help Ray Booysen wrote: Show quoteHide quote >Hi guaravkg > >Not sure what the problem is... But I would suggest the following >changes to the xml file. I'm taking for granted that a product can be >reviewed more than once. > ><products> > <product> > <id></id> > <reviews> > <review> > <review_title> > <review_description> > </review> > </reviews> > </product> ></products> > >This provides a more normalised view of the data. AKA > >Many products. >1 product can have more than one review. > >Hope this is what you're needing. > >> Hi i have a problem >> >[quoted text clipped - 44 lines] >> >> plz review it if not approperiate just tell me how to do It -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200609/1 to answer your second question, your xpath query would be
\products\product[id='11'] You would use xpath to get that node. If you unfamiliar with xslt or xpath then you should try and find a beginner intro to them - plenty on the web. "gauravkg via DotNetMonster.com" <u25584@uwe> wrote in message news:65e25bbff0d3f@uwe...Show quoteHide quote > thanks for the help ,u judge the problem rightly.in this like i > > > > <products> >> <product> >> <id>11</id> >> <reviews> >> <review> >> <review_title>It is good product >> <review_description>i have tried it .It isa good product >> </review> > <review> >> <review_title>It is fabolus product >> <review_description>i have not tried it >> </review> > >> </reviews> >> </product> >></products> >> > > > > now can u tell me xsl format to reterive the row where product id=11. i > really appreciate ur help > > > > > > Ray Booysen wrote: >>Hi guaravkg >> >>Not sure what the problem is... But I would suggest the following >>changes to the xml file. I'm taking for granted that a product can be >>reviewed more than once. >> >><products> >> <product> >> <id></id> >> <reviews> >> <review> >> <review_title> >> <review_description> >> </review> >> </reviews> >> </product> >></products> >> >>This provides a more normalised view of the data. AKA >> >>Many products. >>1 product can have more than one review. >> >>Hope this is what you're needing. >> >>> Hi i have a problem >>> >>[quoted text clipped - 44 lines] >>> >>> plz review it if not approperiate just tell me how to do It > > -- > Message posted via DotNetMonster.com > http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200609/1 >
Other interesting topics
OleDbDataAdapter created in code behaves differently from one created by wizard.
.NET 2005 'Could not load file or assembly' every few days - asp.net 1.1 Q about ASP speeds Iframe extra space problem with GridView Error BC30451 Problems with System.Net.Mail change the scrollbar color in a listbox USe SMTP to Send Mail |
|||||||||||||||||||||||