- prefix
- the Namespace prefix being declared. An empty string is used for the default element namespace, which has no prefix.
- uri
- the Namespace URI the prefix is mapped to
Type Reason Org.Xml.Sax.SAXException the client may throw an exception during processing
Begin the scope of a prefix-URI Namespace mapping.
The information from this event is not necessary for normal Namespace processing: the SAX XML reader will automatically replace prefixes for element and attribute names when the http://xml.org/sax/features/namespaces feature is true (the default).
There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary.
Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each other: all startPrefixMapping events will occur immediately before the corresponding IContentHandler.StartElement(string, System.String, System.String, System.String) event, and all IContentHandler.EndPrefixMapping(string) events will occur immediately after the corresponding IContentHandler.EndElement(string, System.String, System.String) event, but their order is not otherwise guaranteed.
There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.