XML - adding new line

Mario LIPCIK picture Mario LIPCIK · Nov 7, 2012 · Viewed 16.8k times · Source

I have MS word doc saved as .docx. I want to insert new line in my text by edditing XML file of docx. I have already tried 
, 
, 
, 	, amd it always gives me only space not a new line.

what it does:

(XML code) <w:t>hel&#xA;lo</w:t>

When I open .docx file then it is changed to:

Hel lo not as I wanted to be Hel on one line and lo on secound line.

Answer

Jukka K. Korpela picture Jukka K. Korpela · Nov 7, 2012

Use the <w:br/> tag.

I found it by creating a Word document, saving it as XML (via Save As), adding a forced line break with Shift Enter, and checked out the change. The essential difference seems to be just the w:br tag, apparently reflecting the HTML br tag.