public LinkedList scan(ListIterator listiterator, LinkedList linkedlist, LinkedList linkedlist1)
    {
        while(listiterator.hasNext()) 
        {
            XMLNode xmlnode = (XMLNode)listiterator.next();
            if(xmlnode != null)
                switch(xmlnode.XMLType)
                {
                case 0: // '\0'
                    XMLNode xmlnode1 = new XMLNode();
                    xmlnode1.XMLType = xmlnode.XMLType;
                    xmlnode1.XMLData = xmlnode.XMLData;
                    xmlnode1.XMLAttr = xmlnode.XMLAttr;
                    xmlnode1.XMLChild = new LinkedList();
                    xmlnode1.XMLChild = scan(listiterator, linkedlist, xmlnode1.XMLChild);
                    linkedlist1.add(xmlnode1);
                    break;

                case 1: // '\001'
                    XMLNode xmlnode2 = new XMLNode();
                    xmlnode2.XMLType = xmlnode.XMLType;
                    xmlnode2.XMLData = xmlnode.XMLData;
                    xmlnode2.XMLAttr = xmlnode.XMLAttr;
                    linkedlist1.add(xmlnode2);
                    break;

                case 2: // '\002'
                case 3: // '\003'
                    XMLNode xmlnode3 = new XMLNode();
                    xmlnode3.XMLType = 2;
                    xmlnode3.XMLData = xmlnode.XMLData;
                    xmlnode3.XMLAttr = "";
                    linkedlist1.add(xmlnode3);
                    break;

                case 5: // '\005'
                    return linkedlist1;
                }
            else
                Log.userinfo("XML element is null.", Log.ERROR);
        }
        return linkedlist1;
    }