Difference between MS Office and LibreOffice in saving file as Word 2003 XML

I have a question. I save .doc document in MS Word as MS Word 2003 XML file and it looks like that:

<w:p>
    <w:r>
        <w:rPr>
            <w:i/>
            <w:b/>
        </w:rPr>
        <w:t xml:space="preserve">This is a </w:t>
    </w:r>
    <w:r>
        <w:rPr>
            <w:b/>
        </w:rPr>
        <w:t xml:space="preserve">bold </w:t>
    </w:r>
</w:p>

But when I save this .doc in LibreOffice (as a MS Word 2003 XML file, too) it looks different, like this:

<w:r>
    <w:rPr>
        <w:rStyle w:val="T15"/>
    </w:rPr>
    <w:t> 1.1.1.3 </w:t>
</w:r>
<w:r>
    <w:rPr>
    <w:rStyle w:val="T12"/></w:rPr>
    <w:t>Věty hlavní spojené spojovacím výrazem</w:t>
</w:r>

Am I doing something wrong ? Or a reason is compatibility between LibreOffice and MS Office.
Is there any tutorial or xml schema ? How do I know which tag is bold or italic ?

I save .doc document in MS Word as MS Word 2003 XML file

I think you mean an “.xml document in MS Word as MS Word 2003 XML” Sorry, I understand what you mean now, you are saving a DOC (Word 97-2003 format) to the Word 2003 XML format.

Am I doing something wrong ? Or a reason is compatibility between LibreOffice and MS Office.

It is unlikely you are doing something wrong. This is more likely a reflection of LO not comprehensively supporting this particular file format or simply writing out the code differently. Both methods are correct, just different.

Is there any tutorial or xml schema ?

The various LO to WordML XSLTs can be found here.

How do I know which tag is bold or italic ?

In the LO-generated XML this element: <w:rStyle w:val="T12"/> is a reference to a character text style (number 12) which will likely be where the bold definition is made e.g.,

<w:style w:styleId="T2" w:type="character">
    <w:name w:val="T2"/>
    <w:hidden w:val="on"/>
    <w:rPr>
        <w:b/>
    </w:rPr>
</w:style>