ANS-1417 · PRINTING, PDF & EMAIL TEMPLATES
How to Resolve NetSuite XML Parser Error with Image Tags in HTML?
This article explains how to fix an XML parsing error in NetSuite caused by specific HTML structuring of image tags within table cells.
Short answer
To resolve XML parsing errors related to image tags, remove the `<div>` element that encapsulates an `<img>` tag within a `<td>` element. The NetSuite XML parser does not handle this specific nesting well, leading to parsing failures. Directly placing the `<img>` tag inside the `<td>` resolves the issue, allowing the XML to be parsed correctly.
Scenario
Users may encounter an 'Error Parsing XML: Element type "td" must be followed by either attribute specifications, ">" or "/>"' when NetSuite attempts to parse XML. This specific error arises when an `` tag is structured within a `
Solution
The NetSuite XML parser does not operate well with The corrected structure, with the Expert NetSuite Support Need help with this NetSuite issue? Printing, PDF & Email Templates consulting and configuration support tags placed inside a element when that is encapsulated within a <td style="width : 100%;">
<div id="company-logo-container"><img src="${companyInformation.logo}" align="left" style="padding: 0px; margin: 0px;"/></div>
</td><td style="width : 100%;">
<img src="${companyInformation.logo}" align="left" style="padding: 0px; margin: 0px;"/>
</td>
