c# - How to use short namespaces with XElements in .Net? -
I am parsing an XML (RDF in particular) document, originally typed something firmly on the net Mapping the objects. I'm actually using long syntax to select something like the namespace:
ontology.Elements ("{http://www.w3.org/1999/02/22- Rdf-syntax- ontology.Elements ("rdf: property")
what i really want to do>
I know that there was a namespace manager with the old XML framework that you can nominate names of URI names, but it is not certain how to do this with XElements ideas.
< / Div>
Make a namespace differently as a XNamespace
:
XNamespace Rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; ... ontoloy.Elements (rdf + "property");
< P> I manage actually LINQ as XML names, individually.
Comments
Post a Comment