mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-30 14:24:25 +02:00
skip empty namespace decoding
This commit is contained in:
parent
3410b6584f
commit
2b9a65df73
@ -51,6 +51,18 @@ import java.util.Set;
|
||||
return results;
|
||||
}
|
||||
public XMLAttribute decodeToXml(){
|
||||
return new SchemaAttr(getPrefix(), getUri());
|
||||
String uri=getUri();
|
||||
String prefix=getPrefix();
|
||||
if(isEmpty(uri) || isEmpty(prefix)){
|
||||
return null;
|
||||
}
|
||||
return new SchemaAttr(prefix, uri);
|
||||
}
|
||||
private boolean isEmpty(String txt){
|
||||
if(txt==null){
|
||||
return true;
|
||||
}
|
||||
txt=txt.trim();
|
||||
return txt.length()==0;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user