MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / getNamespace

Method getNamespace

src/org/kxml2/io/KXmlParser.java:1139–1155  ·  view source on GitHub ↗
(String prefix)

Source from the content-addressed store, hash-verified

1137 }
1138
1139 public String getNamespace(String prefix) {
1140
1141 if ("xml".equals(prefix))
1142 return "http://www.w3.org/XML/1998/namespace";
1143 if ("xmlns".equals(prefix))
1144 return "http://www.w3.org/2000/xmlns/";
1145
1146 for (int i = (getNamespaceCount(depth) << 1) - 2; i >= 0; i -= 2) {
1147 if (prefix == null) {
1148 if (nspStack[i] == null)
1149 return nspStack[i + 1];
1150 }
1151 else if (prefix.equals(nspStack[i]))
1152 return nspStack[i + 1];
1153 }
1154 return null;
1155 }
1156
1157 public int getDepth() {
1158 return depth;

Callers 2

adjustNspMethod · 0.95
requireMethod · 0.95

Calls 2

getNamespaceCountMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected