```function renderPickingTicketAsXml(orders) { ...
# suitescript
m
Copy code
function renderPickingTicketAsXml(orders) {
    return orders.map(orderId => {
      return render
        .pickingTicket({
          entityId: Number(orderId),
          printMode: render.PrintMode.HTML,
        })
        .getContents()
        .replace('<?xml version="1.0"?>', '')
        .replace('<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">', '')
        .replace('<html>', '<pdf>')
        .replace('</html>', '</pdf>');
    });
  }
a
Hi Michoel, I tried this approach unsuccessfully so far. I like this because it avoids having to go to File Cabinet - just doesn't seem elegant. For some reason, NS keeps throwing new errors while trying to parse the html -> xml files... if you have any more tips for me here, please let me know. last one i got was like The reference to entity \"NS_VER\" must end with the ';'