String input; // [Node(X)][CHILD0(Y)][OBJECT1(A)][Key1(1)][Key2(2)]... String xml = new XmlSerializer(input).toXML(); System.out.println(xml);
/** * Saves the current page, with all images, to the specified location. * The default behavior removes all script elements. * * @param file file to write this page into * @throws IOException If an error occurs */ public void save(final File file) throws IOException { new XmlSerializer().save(this, file); }
/** * Saves the current page, with all images, to the specified location. * The default behavior removes all script elements. * * @param file file to write this page into * @throws IOException If an error occurs */ public void save(final File file) throws IOException { new XmlSerializer().save(this, file); }
/** * Saves the current page with all images at the specified location. * The default behavior removes all script elements. * * @param file file to write this page into * @throws IOException If an error occurs */ public void save(final File file) throws IOException { new XmlSerializer().save(this, file); } }
/** * Saves the current page with all images at the specified location. * The default behavior removes all script elements. * * @param file file to write this page into * @throws IOException If an error occurs */ public void save(final File file) throws IOException { new XmlSerializer().save(this, file); } }
/** * Saves the current page with all images at the specified location. * The default behavior removes all script elements. * * @param file file to write this page into * @throws IOException If an error occurs */ public void save(final File file) throws IOException { new XmlSerializer().save(this, file); } }
var serializer = new XmlSerializer(type); object result;
var serializer = new XmlSerializer(type); object result;
/** * Returns a textual representation of this element that represents what would * be visible to the user if this page was shown in a web browser. For example, * a single-selection select element would return the currently selected value * as text. * * @return a textual representation of this element that represents what would * be visible to the user if this page was shown in a web browser */ public String asText() { if (getPage() instanceof XmlPage) { final XmlSerializer ser = new XmlSerializer(); return ser.asText(this); } final HtmlSerializer ser = new HtmlSerializer(); return ser.asText(this); }
/** * Returns a textual representation of this element that represents what would * be visible to the user if this page was shown in a web browser. For example, * a single-selection select element would return the currently selected value * as text. * * @return a textual representation of this element that represents what would * be visible to the user if this page was shown in a web browser */ public String asText() { if (getPage() instanceof XmlPage) { final XmlSerializer ser = new XmlSerializer(); return ser.asText(this); } final HtmlSerializer ser = new HtmlSerializer(); return ser.asText(this); }