Code example for Document

Methods: getDocumentElement

0
    @Override 
    protected void xmlModelChanged(Document xmlDoc) {
        // create the ui root node on demand. 
        initUiRootNode(false /*force*/); 
 
        Element rootElement = xmlDoc.getDocumentElement();
        mUiRootNode.loadFromXmlNode(rootElement);
 
        super.xmlModelChanged(xmlDoc);
    } 
 
    @Override 
    protected void initUiRootNode(boolean force) {
        // The manifest UI node is always created, even if there's no corresponding XML node. 
        if (mUiRootNode == null || force) {
            ElementDescriptor descriptor;
            AndroidTargetData data = getTargetData();
            if (data == null) {
                descriptor = new ColorDescriptors().getDescriptor();
            } else { 
                descriptor = data.getColorDescriptors().getDescriptor();