(Node parent)
| 143 | } |
| 144 | |
| 145 | private static List getParentList(Node parent) { |
| 146 | Object parentValue = parent.value(); |
| 147 | List parentList; |
| 148 | if (parentValue instanceof List) { |
| 149 | parentList = (List) parentValue; |
| 150 | } else { |
| 151 | parentList = new NodeList(); |
| 152 | parentList.add(parentValue); |
| 153 | parent.setValue(parentList); |
| 154 | } |
| 155 | return parentList; |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Appends a child to the current node. |