// get the lines element
final Element linesElement = invoiceElement.getChild("lines");
if(linesElement == null) {
throw new SwsMissingRequiredElementInResponseException("lines", XmlUtils.xmlElement2String(invoiceElement, Format.getPrettyFormat()));
}
// get the line elements
final List<Element> lineElements = linesElement.getChildren("line");
if(lineElements == null || lineElements.size() == 0) {
throw new SwsMissingRequiredElementInResponseException("line", XmlUtils.xmlElement2String(invoiceElement, Format.getPrettyFormat()));
}
final List<InvoiceLine> invoiceLines = new LinkedList<InvoiceLine>();
for(final Element currentLineElement : lineElements) {