returns the namespace for the given prefix
(String prefix)
| 143 | * returns the namespace for the given prefix */ |
| 144 | |
| 145 | public String getNamespaceUri (String prefix) { |
| 146 | int cnt = getNamespaceCount (); |
| 147 | for (int i = 0; i < cnt; i++) { |
| 148 | if (prefix == getNamespacePrefix (i) || |
| 149 | (prefix != null && prefix.equals (getNamespacePrefix (i)))) |
| 150 | return getNamespaceUri (i); |
| 151 | } |
| 152 | return parent instanceof Element ? ((Element) parent).getNamespaceUri (prefix) : null; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | /** |
no test coverage detected