อัปเดตครั้งล่าสุดเมื่อ
21 ธ.ค. 2021
|
และยังใช้กับ Communiqué 3, Communiqué 4
Issue
When you serialize your pages as XML using XMLUtil class from Day API like Document document = XMLUtil.createXMLDocument(ticket, handle), you receive the following error:
19 Feb 2008 14:42:42,608 DEBUG com.apps.cq.servlets.XmlWriterServlet:71 -requested page cannot provide a default input source:
Solution
See the class com.day.cq.transform.PageToXML. For example:
File xmlFile = new File("/tmp/page.xml"); PageToXML p2xml = new PageToXML(); p2xml.setBinaryAsLink(true); p2xml.apply(cqReq.getTicket().getPage("/content/designground/en/company"), xmlFile);