c# - XML Xpath doesn't return what I want -


i have xml

<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"    xmlns:dcterms="http://purl.org/dc/terms/"    xmlns:oslc="http://open-services.net/ns/core#"    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">     <oslc:responseinfo rdf:about="https://timo-pcvirtual:9443/qm/oslc/users">       <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/dave" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/al" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/ccm_user" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/guest" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/qm_user" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/build" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/rebecca" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/rm_user" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/marco" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/sally" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/tammy" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/tanuj" />        <dcterms:title>users</dcterms:title>        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/ursula" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/etl_user" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/bob" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/curtis" />        <oslc:totalcount>22</oslc:totalcount>        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/lpa_user" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/timo" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/admin" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/deb" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/jts_user" />        <rdfs:member rdf:resource="https://timo-pcvirtual:9443/jts/users/unassigned" />     </oslc:responseinfo> </rdf:rdf> 

i use c# , xpath , want select rdfs:member values (users)

xpathdocument doc = new xpathdocument(response.getresponsestream()); xpathnavigator nav = doc.createnavigator(); xmlnamespacemanager manager = new xmlnamespacemanager(nav.nametable); manager.addnamespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); manager.addnamespace("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); manager.addnamespace("oslc", "http://open-services.net/ns/core#"); xpathnodeiterator iterator = nav.select("/rdf:rdf/oslc:responseinfo/@rdf:resource", manager); 

the iterator count 0, because found no matches. don't understand why.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -