+ // FIXME: 4.0.0: this should follow the startAnydataNode template
+ void startAnyxmlNode(NodeIdentifier name) throws IOException;
+
+ /**
+ * Set the value of current anyxml node. This call is only valid within the context in which an anyxml node is open.
+ *
+ * @param value node value
+ * @throws NullPointerException if the argument is null
+ * @throws IllegalArgumentException if the argument does not represents a valid value
+ * @throws IllegalStateException if an anyxml node is not open or if it's value has already been set and this
+ * implementation does not allow resetting the value.
+ * @throws IOException if an underlying IO error occurs
+ */
+ // FIXME: 5.0.0: this probably should integrated with scalarValue()
+ void domSourceValue(DOMSource value) throws IOException;
+
+ /**
+ * Emits start of new YANG-modeled anyxml node. Valid sub-events are:
+ * <ul>
+ * <li>{@link #startLeafNode}</li>
+ * <li>{@link #startContainerNode}</li>
+ * <li>{@link #startLeafSet}</li>
+ * <li>{@link #startMapNode}</li>
+ * <li>{@link #startUnkeyedList}</li>
+ * </ul>
+ *
+ * @param name name of node as defined in schema, namespace and revision are derived from parent node.
+ * @param childSizeHint Non-negative count of expected direct child nodes or {@link #UNKNOWN_SIZE} if count is
+ * unknown. This is only hint and should not fail writing of child events, if there are more
+ * events than count.
+ * @throws NullPointerException if {@code name} is null
+ * @throws IllegalArgumentException If emitted node is invalid in current context or was emitted multiple times.
+ * @throws IllegalStateException If node was emitted inside {@code map}, {@code choice} or a {@code unkeyed list}
+ * node.
+ * @throws IOException if an underlying IO error occurs
+ */
+ void startYangModeledAnyXmlNode(NodeIdentifier name, int childSizeHint) throws IOException;