public class EnsureNSUri extends BaseElementWalker
Modifier and Type | Class and Description |
---|---|
class |
EnsureNSUri.WalkElement
the resource walker note the naming convention Walkxxx so that it is automagically instantiated by the super classes
|
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,String> |
aliasMap |
protected BiHashMap<String,String> |
nsMap |
log
theFactory
Constructor and Description |
---|
EnsureNSUri() |
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String badPrefix,
String goodPrefix)
add a an alias
|
void |
addNS(String prefix,
String uri)
add a prefix / uri pair
|
String |
toString() |
void |
walk(KElement root) |
getFactory
walkTree, walkTreeKidsFirst
public void addNS(String prefix, String uri)
prefix
- the namespace prefix - may be null for empty namespaceuri
- the URI must not be nullIllegalArgumentException
- if uri is nullpublic void addAlias(String badPrefix, String goodPrefix)
badPrefix
- the ns prefix to rename (e.g. ns1)goodPrefix
- the destination prefixpublic void walk(KElement root)
root
- public String toString()
toString
in class ElementWalker
ElementWalker.toString()
Copyright © 2018. All rights reserved.