Generated XHTML for word table with extra inserted cell in row is not in correct format

Hi,

testdoc-1.docx (24.8 KB)

For the attached document, if I try to generate XML using C#. Net. I get extra tag as below.

<table>
    <thead>
        <tr></tr>
        ….
        <tr></tr>
    </thead>
    <tbody>
        <tr></tr>
        ….
        <tr></tr>
    </tbody>
    <tr>
        // This tr tag which is not part of <thead> or <tbody> or <tfoot> tag.
    </tr>
</table>

This same behavior can be seen at DOCX To XHTML Converter Free. DOCX To XHTML Online . So not attaching relevant code from C#.

Extra information :
When, table is changed to be of any style from Tables Style in Word. the generated xhtml looks something like below.

<table>                
    <tr></tr>
    ….
    <tr></tr>
</table>

@manikya.rao Could you please elaborate the problem? Do you mean the last dummy zero-height row must be inside tbody?

Yes, Alexey.

If a table is having , etc tag, then tr must be as part of any of it. But in this case it’s coming outside of any.

This is causing failure in the code flow of our application, which expect to be either be part of , , if any of it is present. It can be only directly within

tag if none of or similar tags are present.

@manikya.rao Thank you for clarification.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26585

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-26585) have been fixed in this Aspose.Words for .NET 24.3 update also available on NuGet.