473,387 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XML PROBLEM HELP NEEDED URGENTLY

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_titlegood book</review_title>

<review_contentthe book it is a good book</review_content>

</Product>

<Product>

<id>112</id>

<review_titlegood book</review_title>

<review_contentthe book it is a good book</review_content>

</Product>

</reviews>

plz review it if not approperiate just tell me how to do It

--
Message posted via http://www.dotnetmonster.com

Sep 6 '06 #1
3 1077
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:
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_titlegood book</review_title>

<review_contentthe book it is a good book</review_content>

</Product>

<Product>

<id>112</id>

<review_titlegood book</review_title>

<review_contentthe book it is a good book</review_content>

</Product>

</reviews>

plz review it if not approperiate just tell me how to do It
Sep 6 '06 #2
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/For...p-net/200609/1

Sep 6 '06 #3
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@uwewrote in message
news:65e25bbff0d3f@uwe...
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/For...p-net/200609/1

Sep 6 '06 #4

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

Similar topics

0
by: Kamliesh Nadar | last post by:
Hi I am developing a software using VB.NET I am facing following problems - 1. Though I have placed the NotifyIcon control on the window service application, after starting the service I am...
15
by: Alfonso Morra | last post by:
Hi, I have some code from an example, that I want to retrofit into my project. The code from the example has the following line: SharedAppenderPtr myAppender( new...
1
by: Linesh Gajera | last post by:
Hi Guys i having the same problem with Strongly typed dataset, I have created a stronsetly typed dataset by draging table from Server explorer and now i have retreived xml from SQL server 2000...
0
by: Amit | last post by:
hi friends , I am stuck with a problem and need ur help. I have knowledge management application where i am using third party forums that needs login.I have username and password for forums...
4
by: xunitinmullik | last post by:
Hello ppl: I am facing a problem that I ahve never experienced before with the secured database. I created an MS Access 2000 application (.mdb) using MS Access 2002 and secured it using exactly...
5
by: el prinCipante | last post by:
I'm getting tired of the following error message. Compiler Error message : Error: Need explicit cast to convert from: float to: float * I am trying to use a routine from the Numerical Recipes...
1
by: pathakrajeev | last post by:
Hi I needed help urgently. Suppose I have file name like test12wehow.asp test11234r5wesow.asp,upppwenow.asp. one thing is common in all the files are "we". I want to read the file as...
1
by: janakivenk | last post by:
Hello, I am running Oracle 10g R2 in our office. I created the following procedure. It is suppose to access an xml file ( family.xml). The procedure is compiled and when I try to run it, i get the...
1
by: Robert Wells | last post by:
Gentlemen, We are looking for two IBM documents that are needed urgently for a project. They are titled "4680 Store Systems Serial I/O Channel Attachment Information" and "Serial I/O Product...
19
by: uhdam | last post by:
Hai... I need to have image as tooltip. Is it possible. If yes how. I dont want to use applet. When i scroll over the label in my frame the pop up containing the image should be displayed. How can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.