xmlnodelist

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sarabonn
    New Member
    • Nov 2008
    • 69

    xmlnodelist

    hallo everyone,

    iam getting a xmlnodelist and how can i read the attributes of it ?..
    Code:
    This is my code line.
    
     XmlNodeList doc = xdoc.GetElementsByTagName("sioc:Item");
    
    my xml file
    
    
    - <sioc:Item rdf:about="http://www.blabla.com">
      <sioc:link rdf:resource="http://www.blabla.com" /> 
      <dc:title>File3.pptx</dc:title> 
      <rdfs:label>File3.pptx</rdfs:label> 
      <dc:description>checking</dc:description> 
      <content:encoded>checking</content:encoded> 
      <dc:identifier>1469646</dc:identifier> 
      <dcterms:extent>1811947</dcterms:extent> 
      <dc:type>application/vnd.ms-powerpoint.presentation.12</dc:type> 
      <dcterms:created>2008-11-12T12:27:25Z</dcterms:created> 
      <dcterms:modified>2008-11-17T09:36:46Z</dcterms:modified> 
    - <sioc:has_creator>
    - <sioc:User rdf:about="http://www.blabla.com">
      <rdfs:label>dinesh</rdfs:label> 
      </sioc:User>
      </sioc:has_creator>
      </sioc:Item>
      </rdf:RDF>
    .

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

    Thank you.
  • nukefusion
    Recognized Expert New Member
    • Mar 2008
    • 221

    #2
    Something like:

    Code:
    XmlNodeList list = doc.GetElementsByTagName("sioc:Item");
    foreach (XmlNode node in list)
    {
        string value = node.Attributes["rdf:about"].Value;
    }

    Comment

    • sarabonn
      New Member
      • Nov 2008
      • 69

      #3
      Originally posted by nukefusion
      Something like:

      Code:
      XmlNodeList list = doc.GetElementsByTagName("sioc:Item");
      foreach (XmlNode node in list)
      {
          string value = node.Attributes["rdf:about"].Value;
      }
      Thank you nukefusion...

      Comment

      Working...