SmilContentHandlerpublic class SmilContentHandler extends DefaultHandler
Fields Summary |
---|
private static final String | TAG | private static final boolean | DEBUG | private static final boolean | LOCAL_LOGV | private org.w3c.dom.smil.SMILDocument | mSmilDocument | private Node | mCurrentNode |
Methods Summary |
---|
public void | characters(char[] ch, int start, int length)
if (LOCAL_LOGV) {
Log.v(TAG, "SmilContentHandler.characters. ch = " + new String(ch, start, length));
}
| public void | endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
if (LOCAL_LOGV) {
Log.v(TAG, "SmilContentHandler.endElement. localName " + localName);
}
mCurrentNode = mCurrentNode.getParentNode();
| public org.w3c.dom.smil.SMILDocument | getSmilDocument()Returns the SMILDocument.
return mSmilDocument;
| public void | reset()Resets this handler.
mSmilDocument = new SmilDocumentImpl();
mCurrentNode = mSmilDocument;
| public void | startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
if (LOCAL_LOGV) {
Log.v(TAG, "SmilContentHandler.startElement. Creating element " + localName);
}
Element element = mSmilDocument.createElement(localName);
if (attributes != null) {
for (int i = 0; i < attributes.getLength(); i++) {
if (LOCAL_LOGV) {
Log.v(TAG, "Attribute " + i +
" lname = " + attributes.getLocalName(i) +
" value = " + attributes.getValue(i));
}
element.setAttribute(attributes.getLocalName(i),
attributes.getValue(i));
}
}
if (LOCAL_LOGV) {
Log.v(TAG, "Appending " + localName + " to " + mCurrentNode.getNodeName());
}
mCurrentNode.appendChild(element);
mCurrentNode = element;
|
|