User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 426,133 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,772 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 1148 | Replies: 0
Reply
Join Date: Apr 2007
Posts: 12
Reputation: Shruthi_R is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Shruthi_R Shruthi_R is offline Offline
Newbie Poster

Help XML feeds

  #1  
May 29th, 2007
this is one feed
- <category name="Television" timeGenerated="2007-05-28T23:21:13" >
- <event name="Channel1" eventid="573512.20" date="20090701" time="1000" meeting="" >
- <televisiontype name=" Outright" inrunning="0">
<TV name="Videocon" id="16007131.20" price="$222" />
<TV name="Philips" id="16007132.20" price="$322" />
<TV name="Western" id="16007133.20" price="$121" />
</televisiontype>
</event>

</category>
this is another XML feed
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE abcd SYSTEM "abcd.dtd"><abcd version="6.0" created="2007-05-29 06:15:26" lastMsgId="3080173">
<response>
<returnStatus>
<code>100</code>
<message>success</message>
</returnStatus>
<respQueryApplyXSLT>


<class>
<id>9</id>
<name>Television</name>

<type>
<id>4020</id>
<name>Videocon</name>

<event>
<id>2890</id>
<name>channel1</name>
<date>2007-06-07</date>
<time>09:30:00</time>

<market>
<id>11819</id>
<name>Asia</name>
<eachway>
<reduction>/</reduction>
<place/>
</eachway>
<outcome>
<name>Speaker</name>
<price>$2000</price>
</outcome>
</type>
<type>
<id>4020</id>
<name>Philips</name>

<event>
<id>2890</id>
<name>channel1</name>
<date>2007-06-07</date>
<time>09:30:00</time>

<market>
<id>11819</id>
<name>Africa</name>
<eachway>
<reduction>/</reduction>
<place/>
</eachway>
<outcome>
<name>Speaker</name>
<price>$2100</price>
</outcome>
</type>
</class>
</respQueryApplyXSLT>
</response>
</abcd>

now i have database fields like

categoryname
eventname
Typename
Price

from the first set of xml feeds i have done like

xmldocument xmldoc=new xmldocument();
xmldoc.LoadXML(URL);
Xmlnode nevents=xmldoc.Childnodes[0];
categoryname=nevents.attributes["name"];
foreach(xmlnode nevent in nevents)
{
eventname=?
foreach(xmlnode type in nevent.childnodes)
{
typename=?
foreach(Xmlnode nprice in type)
{
price=?
}
}
}

now taking a look at the second xml feed the contents are same like
i need to match the price alone
for example i need to load only the price for videocon from the second feed matching the first feed
i dont know how to proceed on this
plz help me on this regard
Shruthi
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb XML, XSLT and XPATH Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the XML, XSLT and XPATH Forum

All times are GMT -4. The time now is 4:37 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC