private void extractMaster(XHTMLContentHandler xhtml, HSLFMasterSheet master) throws SAXException { if (master == null) { return; } List<HSLFShape> shapes = master.getShapes(); if (shapes == null || shapes.isEmpty()) { return; } xhtml.startElement("div", "class", "slide-master-content"); for (HSLFShape shape : shapes) { if (shape != null && !HSLFMasterSheet.isPlaceholder(shape)) { if (shape instanceof HSLFTextShape) { HSLFTextShape tsh = (HSLFTextShape) shape; String text = tsh.getText(); if (text != null) { xhtml.element("p", text); } } } } xhtml.endElement("div"); }