1

I am new to xml parsing

Can you explain what is key and key namespace in the following xml

<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds saml samlp xs xsi"/>

Thanks in advance!!

vinu vizal
  • 25
  • 5
  • It isn't clear what you are asking. There is nothing in the XML named key. It is possible that you are trying to refer to something and using the wrong terminology, such that we don't know what you are asking. For instance, are you asking what the namespace is for the `ec:InclusiveNamespaces` element and the relationship between the `ec` namespace-prefix and the `xmlns:ec` namespace declaration? Or is your snippet of XML missing the information that would provide context and include something called "key"? – Mads Hansen Feb 26 '20 at 18:39

1 Answers1

1

The term key is not defined at the XML level.

In XML Schema (XSD), a key is a part of Identity-constraint Definitions and defines how to assemble a unique identifier via XPath selector and field declarations. However, there's neither evidence nor a means of surmising whether or not your XML might have any such keys defined.

From your XML, you might be interested to learn that ec is a namespace prefix, which is an abbreviation for http://www.w3.org/2001/10/xml-exc-c14n#, the namespace value. See also What is the difference between namespace and prefix in XML?

As a final note, the InclusiveNamespaces XML element you've posted is used in the Exclusive XML Canonicalization, Version 1.0, Recommendation.

kjhughes
  • 106,133
  • 27
  • 181
  • 240