473,383 Members | 1,859 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,383 software developers and data experts.

How can i filter information from only one category with Xpath

1
Hi
This is my first post here. I really hope i can speak the same language as you data experts.

What i'd like to do is select products in only one category from a .xml file. The xpath structure looks like this:

Expand|Select|Wrap|Line Numbers
  1. <data>
  2. -<node>
  3.    <name>​1 Rad Namnsmycke - Original &​quot;​Dam&​quot​;</name>
  4.    <category>​Namnsmycken​</category>
  5.    <sku>​30​</sku>
  6.    <ean/>
  7. -<description>
  8. ​Ett personligt smycke i ä​kta sterlingsilver. Komplett med en 1,​5 mm kull​ä​nkskedja i valfri l​ä​ngd. M​å​tten p​å brickan varierar, beroende p​å textval, men...
  9. </description>
  10.    <model/>
  11.    <brand/>
  12.    <price>​350.​00​</price>
  13.    <shippingprice/>
  14.    <currency>​SEK​</currency>
  15. -<producturl>
  16. ​http​://​click.​adrecord.​com​/?​p=​xxx&​amp;​c=​xxxxxx&​amp;​url=​http​://​http://www.​butikstylish.&#820...8203;30​
  17.   </producturl>
  18. -<graphicurl>
  19. ​http​://​www.​butikstylish.​se/​img/​p/​2/​2-​large.​jpg​
  20.    </graphicurl>
  21.    <instock>​1​</instock>
  22.    <instockqty/>
  23.    <deliverytime/>
  24.    <regularprice>​350.​00​</regularprice>
  25.    <gender/>
  26. </node>
The file contains 421 products in 23 categories and i'd like to just import products from one category.

I hope i made my question clear enough and looking forward for your assistans.

Thanks!
Feb 4 '13 #1
1 1572
Mikkeee
94 64KB
What dev language(c#, vb.net) are you using?
Feb 14 '13 #2

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

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
1
by: DV | last post by:
Hello, can anyone tell me or point me to somewhere what the exact differences (in terms of when would I use what) between XPath, XLink, XPointer and DOM are? Does it require special software...
1
by: Dinesh | last post by:
Hello, I have a very complex XmlDocument. I want to create a new XmlDocument that contain only certain certain elements, based on a set of XPATH expressions I have. What is the easiest and...
0
by: Kurt Kubein | last post by:
Hi, I have this xmldoc linked to a xmldatasource in .Net 2.0 <MENUROOT title="Home" visible="true"> <MENU title="subnode_1" visible="true"> <MENUITEM title="leafnode_1" visible="true" />...
14
by: YiMkiE | last post by:
I am a newbie of C and I need to do a program to get the current date information only, without the time. I have my code here: #include <stdio.h> #include <time.h> #include <string.h> int...
3
by: ziggyware | last post by:
Hi All, I have updated my XPath Generator software: XPath Studio .NET. ( http://www.ziggyware.com/downloads.php?cat_id=2 ) Easily select nodes from an xml file to generate XPath statements ...
3
by: Jason Mobarak | last post by:
Hello -- I'm attempting to get a handle on how to do xpath queries with System.Xml -- so far the biggest hurdle has been how to deal with a default namespace. If I use the test xml: <?xml...
1
by: Nasher | last post by:
How do you get a combo box to filter the information a user can select in another combo box. Basically i have a orders form where users select a location from a combo box. i then have a second...
1
by: manupr | last post by:
I have two table here uncorfirmed booking and confirmed bookings I only want data to be listed in the unconfirmed booking table when conformation = no and in only want data to be lised in...
2
ilya Kraft
by: ilya Kraft | last post by:
Hello, On my website I have a form where users can make articles. They Enter Title, Text and choose a category. The problem is that I don't know how to make the "Select category thing". Here...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.