Not able to get the 'dcterms:title' and 'oslc:serviceProvider' values from CCM catalog document using XPath expression
Hello,
i am going through the OSLC Workshop projects, and trying to parse the CCM service provider catalog document using XPath. So i followed all the instructions there and tried to retrieve the title of the projects from catalog, using XPath expression as :
'/rdf:RDF/oslc:ServiceProviderCatalog/oslc:serviceProvider/oslc:ServiceProvider/dcterms:title'
and also set the namespaces as :
XPath xpath2 = factory.newXPath();
but i am not getting the titles here.
And also when i try the same by setting the XPath expression as : "//dcterms:title";
which is simplified expression, then it lists out all the project titles.
But overall i want to retrieve the title of project and its 'services.xml' document's URL, so i need to go from root of catalog, therefore i can not use the simplified XPath expression.
So my question is what is the correct expression to get the title and 'services.xml' document's URL using XPath?
i am going through the OSLC Workshop projects, and trying to parse the CCM service provider catalog document using XPath. So i followed all the instructions there and tried to retrieve the title of the projects from catalog, using XPath expression as :
'/rdf:RDF/oslc:ServiceProviderCatalog/oslc:serviceProvider/oslc:ServiceProvider/dcterms:title'
and also set the namespaces as :
XPath xpath2 = factory.newXPath();
xpath2.setNamespaceContext(
new NamespaceContextMap(new String[]
{ "oslc", "http://open-services.net/ns/core#",
"rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"dcterms","http://purl.org/dc/terms/",
}));
but i am not getting the titles here.
And also when i try the same by setting the XPath expression as : "//dcterms:title";
which is simplified expression, then it lists out all the project titles.
But overall i want to retrieve the title of project and its 'services.xml' document's URL, so i need to go from root of catalog, therefore i can not use the simplified XPath expression.
So my question is what is the correct expression to get the title and 'services.xml' document's URL using XPath?