Method GetPrefixes
GetPrefixes()
Return an enumeration of all prefixes whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden.
Note: if there is a default prefix, it will not be returned in this enumeration; check for the default prefix using the GetUri(String) with an argument of "".
Declaration
public IEnumerable GetPrefixes()
Returns
Type | Description |
---|---|
IEnumerable | An enumeration of prefixes (never empty). |
See Also
GetPrefixes(String)
Return an enumeration of all prefixes for a given URI whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden.
This method returns prefixes mapped to a specific Namespace URI. The xml: prefix will be included. If you want only one prefix that's mapped to the Namespace URI, and you don't care which one you get, use the GetPrefix(String) method instead.
Note: the empty (default) prefix is never included in this enumeration; to check for the presence of a default Namespace, use the GetUri(String) method with an argument of "".
Declaration
public IEnumerable GetPrefixes(string uri)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | The Namespace URI. |
Returns
Type | Description |
---|---|
IEnumerable | An enumeration of prefixes (never empty). |