private void writeContent(DicomObject attrs, String qName) throws SAXException, IOException { AttributesImpl atts = new AttributesImpl(); if (!attrs.isRoot()) { atts.addAttribute("", ATTR_OFF, ATTR_OFF, "", Long.toString(attrs.getItemOffset())); } ch.startElement("", qName, qName, new AttributesImpl()); for (Iterator<DicomElement> it = attrs.iterator(); it.hasNext();) { writeElement(attrs, it.next()); } ch.endElement("", qName, qName); }