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

xmlnodelist

hallo everyone,

iam getting a xmlnodelist and how can i read the attributes of it ?..
Expand|Select|Wrap|Line Numbers
  1.  
  2. This is my code line.
  3.  
  4.  XmlNodeList doc = xdoc.GetElementsByTagName("sioc:Item");
  5.  
  6. my xml file
  7.  
  8.  
  9. - <sioc:Item rdf:about="http://www.blabla.com">
  10.   <sioc:link rdf:resource="http://www.blabla.com" /> 
  11.   <dc:title>File3.pptx</dc:title> 
  12.   <rdfs:label>File3.pptx</rdfs:label> 
  13.   <dc:description>checking</dc:description> 
  14.   <content:encoded>checking</content:encoded> 
  15.   <dc:identifier>1469646</dc:identifier> 
  16.   <dcterms:extent>1811947</dcterms:extent> 
  17.   <dc:type>application/vnd.ms-powerpoint.presentation.12</dc:type> 
  18.   <dcterms:created>2008-11-12T12:27:25Z</dcterms:created> 
  19.   <dcterms:modified>2008-11-17T09:36:46Z</dcterms:modified> 
  20. - <sioc:has_creator>
  21. - <sioc:User rdf:about="http://www.blabla.com">
  22.   <rdfs:label>dinesh</rdfs:label> 
  23.   </sioc:User>
  24.   </sioc:has_creator>
  25.   </sioc:Item>
  26.   </rdf:RDF>
  27.  
.

i want to read the rdf:about in that sioc:item..

Thank you.
Nov 20 '08 #1
2 2271
nukefusion
221 Expert 100+
Something like:

Expand|Select|Wrap|Line Numbers
  1. XmlNodeList list = doc.GetElementsByTagName("sioc:Item");
  2. foreach (XmlNode node in list)
  3. {
  4.     string value = node.Attributes["rdf:about"].Value;
  5. }
  6.  
Nov 20 '08 #2
Something like:

Expand|Select|Wrap|Line Numbers
  1. XmlNodeList list = doc.GetElementsByTagName("sioc:Item");
  2. foreach (XmlNode node in list)
  3. {
  4.     string value = node.Attributes["rdf:about"].Value;
  5. }
  6.  
Thank you nukefusion...
Nov 20 '08 #3

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

Similar topics

1
by: Roe | last post by:
Hi! Here's my code: //xd is an XmlDocument object, xnm is an XmlNameSpaceManager XmlNodeList xnl = xd.SelectNodes ("/bd:SubscriptionInfoSet/bd:SubscriptionInfo",xnm); //TEST: Check to see...
1
by: Peter Nofelt | last post by:
Hey All, I'm running into this issue with parsing through an xml document by tag name. Below is an example xml document: File Name: things.xml <things> <people> <name>Peter</name>
1
by: Roshawn Dawson | last post by:
Hi, I have the following line of code that continues to give me the "Object not set to an instance of an object" error: <%# CType(Container.DataItem,...
0
by: Matthew.DelVecchio | last post by:
hello, i am attempting to do some databinding of an XmlNodeList to a DropDownList. id like to avoid looping thru my nodelist and hoped to do a simple .DataSource/.DataBind technique. for...
3
by: Maurice Cosgrave | last post by:
Hi, I was wondering if there was a way to move values from an array into an XmlNodeList? I have the values loaded into a string array from a previous point in the application; now I need to...
4
by: SkyHook | last post by:
1. Under the topic "Select Nodes Using XPath Navigation" it says: "All XmlNodeList objects are synchronized with the underlying document, therefore if you ... modify the value of a node, that node...
1
by: bigeddie | last post by:
Hi, I'm trying to get an instance off a XmlNodeList without using selectNodes(...) XmlNodeList test1 = new XmlNodeList(); (C#) but that doesn't work. What's my mistake?
4
by: eggie5 | last post by:
Hi, I have an XmlNodeList and I need to reverse it. Just like Array.Reverse(), but it has to stay as an XmlNodeList. Any ideas?
0
by: nandha8210 | last post by:
hi all, i want to sort an XmlNodeList based on a innertext value of a XmlNode in the XmlNodeList and would like to save the sorted order to be reflected in the source XML document from where the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.