// Path: htmlview2/src/main/java/org/kobjects/dom/Node.java
// public interface Node {
//   Node getParentNode();
//   Element getParentElement();
//   Document getOwnerDocument();
// 
//   Node getFirstChild();
//   Node getLastChild();
//   Node getNextSibling();
//   Node getPreviousSibling();
// 
//   Node appendChild(Node node);
// 
//   String getTextContent();
// }
// 
// Path: htmlview2/src/main/java/org/kobjects/dom/Text.java
// public interface Text extends Node {
//     String getData();
// }


import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import org.kobjects.dom.Node;
import org.kobjects.dom.Text;
import java.net.URISyntaxException;
package org.kobjects.htmlview2;



/**
 * Synchronizes the physical view hierarchy to the DOM.
 */
class TreeSync {

  static void syncContainer(HtmlViewGroup physicalContainer, Hv2DomContainer logicalContainer, boolean clear) {
    if (logicalContainer.syncState == Hv2DomContainer.SyncState.SYNCED) {
      return;
    }
    logicalContainer.syncState = Hv2DomContainer.SyncState.SYNCED;
    if (clear) {
      physicalContainer.removeAllViews();
    }
    HtmlTextView pendingText = null;
// Path: htmlview2/src/main/java/org/kobjects/dom/Node.java
// public interface Node {
//   Node getParentNode();
//   Element getParentElement();
//   Document getOwnerDocument();
// 
//   Node getFirstChild();
//   Node getLastChild();
//   Node getNextSibling();
//   Node getPreviousSibling();
// 
//   Node appendChild(Node node);
// 
//   String getTextContent();
// }
// 
// Path: htmlview2/src/main/java/org/kobjects/dom/Text.java
// public interface Text extends Node {
//     String getData();
// }


// Path: htmlview2/src/main/java/org/kobjects/htmlview2/TreeSync.java
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import org.kobjects.dom.Node;
import org.kobjects.dom.Text;
import java.net.URISyntaxException;

package org.kobjects.htmlview2;



/**
 * Synchronizes the physical view hierarchy to the DOM.
 */
class TreeSync {

  static void syncContainer(HtmlViewGroup physicalContainer, Hv2DomContainer logicalContainer, boolean clear) {
    if (logicalContainer.syncState == Hv2DomContainer.SyncState.SYNCED) {
      return;
    }
    logicalContainer.syncState = Hv2DomContainer.SyncState.SYNCED;
    if (clear) {
      physicalContainer.removeAllViews();
    }
    HtmlTextView pendingText = null;
    Node child = logicalContainer.getFirstChild();