Purpose:Provides a means to customise the namespace prefixes used while marshalling An implementation of this class can be set on an instance of XMLMarshaller to allow for each instance of XMLMarshaller to use different namespace prefixes.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | getContextualNamespaceDecls()
Returns a string array of prefixes and namespace uris that are already available in this context. |
| public String[] | getPreDeclaredNamespaceUris()
Returns a list of namespace uris that should be declared at the root of the xml document being marshalled. |
| public String[] | getPreDeclaredNamespaceUris2()
Returns a string array of prefixes and namespace uris to be declared at the root of the document. |
| public abstract String |
| NamespacePrefixMapper | back to summary |
|---|---|
| protected NamespacePrefixMapper() Default constructor. | |
| getContextualNamespaceDecls | back to summary |
|---|---|
| public String[] getContextualNamespaceDecls() Returns a string array of prefixes and namespace uris that are already available in this context. Only required when marshalling to an output stream or a writer, since it's not possible to determine which namespaces are already in scope. | |
| getPreDeclaredNamespaceUris | back to summary |
|---|---|
| public String[] getPreDeclaredNamespaceUris() Returns a list of namespace uris that should be declared at the root of the xml document being marshalled. | |
| getPreDeclaredNamespaceUris2 | back to summary |
|---|---|
| public String[] getPreDeclaredNamespaceUris2() Returns a string array of prefixes and namespace uris to be declared at the root of the document. This eliminates the need of implementing both getPredeclaredNamespaceUris and getPreferredPrefix since the prefix and uri can be associated here. | |
| getPreferredPrefix | back to summary |
|---|---|
| public abstract String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) | |