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

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -