String xml = "<qos>\n" +
" <isPublish/>\n" +
" <clientProperty name='StringKey' type=''><BlaBla attr1='val1' attr2=' val2 '> Something </BlaBla></clientProperty>\n" +
"</qos>";
MsgQosSaxFactory parser = new MsgQosSaxFactory(this.glob);
MsgQosData data = parser.readObject(xml);
ClientProperty prop = data.getClientProperty("StringKey");
System.out.println(prop.toXml());
// assertEquals("", true, prop.isBase64());
String val = "<BlaBla attr1='val1' attr2=' val2 '> Something </BlaBla>";
prop = new ClientProperty("StringKey", null, Constants.ENCODING_FORCE_PLAIN, val);
System.out.println(prop.toXml());
xml = "<qos>\n" +
" <isPublish/>\n" +
" <clientProperty name='StringKey' type='' encoding='forcePlain'><qos attr1='val1' attr2=' val2 '> Something </qos></clientProperty>\n" +
"</qos>";
parser = new MsgQosSaxFactory(this.glob);
data = parser.readObject(xml);
prop = data.getClientProperty("StringKey");
System.out.println(prop.toXml());
xml = "<qos>\n" +
" <isPublish/>\n" +
" <clientProperty name='StringKey' type='' encoding='forcePlain'><clientProperty name='aaa' type='' encoding=''>Something</clientProperty></clientProperty>\n" +
"</qos>";
parser = new MsgQosSaxFactory(this.glob);
data = parser.readObject(xml);
prop = data.getClientProperty("StringKey");
System.out.println(prop.toXml());
System.out.println("END");
}