// <info> element
NodeList elems = p_post.getElementsByTagName(INFO_TAGNAME);
if (elems.getLength() > 0) {
Element elem = (Element)elems.item(0);
CDATASection cdata = (CDATASection)elem.getFirstChild();
if (cdata != null)
setInfo(cdata.getData());
}
// <message> element
elems = p_post.getElementsByTagName(MESSAGE_TAGNAME);
if (elems.getLength() > 0) {
Element elem = (Element)elems.item(0);
CDATASection cdata = (CDATASection)elem.getFirstChild();
if (cdata != null)
setRawMessage(cdata.getData());
}
// <login> element
elems = p_post.getElementsByTagName(LOGIN_TAGNAME);
if (elems.getLength() > 0) {
Element elem = (Element)elems.item(0);
CDATASection cdata = (CDATASection)elem.getFirstChild();
if (cdata != null)
setLogin(cdata.getData());
}
}
else
throw new BadPostException("The element is not a <" + POST_TAGNAME + ">");
}