/** * Generate an open element for the tag, output the indicated text, and * then output the closing element for that tag. * * @param tag * The tag (element name). * @param text * The text, which will be automatically encoded as * appropriate for a CDATA section. * * @return This {@link Node}. * * @throws IOException */ public Node node(final String tag, final String text) throws IOException { closeHead(); m_nodes++; final Node tmp = new Node(tag, this); tmp.text(text); final Node ret = tmp.close(); assert ret == this; return ret; }
/** * Generate an open element for the tag, output the indicated text, and * then output the closing element for that tag. * * @param tag * The tag (element name). * @param text * The text, which will be automatically encoded as * appropriate for a CDATA section. * * @return This {@link Node}. * * @throws IOException */ public Node node(final String tag, final String text) throws IOException { closeHead(); m_nodes++; final Node tmp = new Node(tag, this); tmp.text(text); final Node ret = tmp.close(); assert ret == this; return ret; }
/** * Create and return a new {@link Node}. The head of the {@link Node} * will be open. Attributes may be specified until the closing tag is * generated by {@link Node#close()} or until the head of the node is * closed by {@link Node#text(String)}. * * @param tag * The tag for that {@link Node}. * * @return The new {@link Node}. * * @throws IOException */ public Node node(final String tag) throws IOException { closeHead(); m_nodes++; return new Node(tag, this); }
/** * Create and return a new {@link Node}. The head of the {@link Node} * will be open. Attributes may be specified until the closing tag is * generated by {@link Node#close()} or until the head of the node is * closed by {@link Node#text(String)}. * * @param tag * The tag for that {@link Node}. * * @return The new {@link Node}. * * @throws IOException */ public Node node(final String tag) throws IOException { closeHead(); m_nodes++; return new Node(tag, this); }
public Node root(String name) throws IOException { return new Node(name, null); }
public Node root(String name, String nodeText) throws IOException { Node root = new Node(name, null); root.text(nodeText); return root.close(); }
public Node root(String name) throws IOException { return new Node(name, null); }
public Node root(String name, String nodeText) throws IOException { Node root = new Node(name, null); root.text(nodeText); return root.close(); }