首页 > 解决方案 > XML 中的文本拆分问题

问题描述

我面临 xml 文件中的行拆分问题。在 docx 中作为单行出现的行在 xml 中被拆分为 2 或 3 个文本标签。请在下面找到示例 xml 段落以更好地解决问题。根据 docx,这些行如下:“如果您: • 对这种药片或任何其他含有该化学物质或该片剂的任何其他成分的药物过敏(过敏),请不要使用此药片。”

对此的任何帮助将不胜感激。提前致谢。

XML示例段落如下:

    <w:p>
        <w:pPr>
            <w:pStyle w:val="Normal"/>
            <w:autoSpaceDE w:val="false"/>
            <w:rPr></w:rPr>
        </w:pPr>
        <w:r>
            <w:rPr>
                <w:rFonts w:cs="Times-Bold" w:ascii="Times-Bold" w:hAnsi="Times-Bold"/>
                <w:b/>
                <w:bCs/>
                <w:color w:val="000000"/>
            </w:rPr>
            <w:t xml:space="preserve">Do not use </w:t>
        </w:r>
        <w:r>
            <w:rPr>
                <w:b/>
                <w:lang w:val="en-GB"/>
            </w:rPr>
            <w:t>This tablet if you:</w:t>
        </w:r>
        <w:r>
            <w:rPr>
                <w:rFonts w:cs="Times-Roman" w:ascii="Times-Roman" w:hAnsi="Times-Roman"/>
                <w:color w:val="000000"/>
            </w:rPr>
            <w:t xml:space="preserve"></w:t>
            <w:br/>
        </w:r>
    </w:p>
    <w:p>
        <w:pPr>
            <w:pStyle w:val="Normal"/>
            <w:numPr>
                <w:ilvl w:val="0"/>
                <w:numId w:val="12"/>
            </w:numPr>
            <w:autoSpaceDE w:val="false"/>
            <w:ind w:left="720" w:hanging="360"/>
            <w:rPr></w:rPr>
        </w:pPr>
        <w:r>
            <w:rPr>
                <w:rFonts w:cs="Times-Roman" w:ascii="Times-Roman" w:hAnsi="Times-Roman"/>
                <w:color w:val="000000"/>
            </w:rPr>
            <w:t xml:space="preserve">are allergic (hypersensitive) to </w:t>
        </w:r>
        <w:r>
            <w:rPr>
                <w:lang w:val="en-GB"/>
            </w:rPr>
            <w:t>This tablet or any other medicines containing this chemical or any of the other ingredients of this Tablet.</w:t>
        </w:r>
    </w:p>

标签: xml

解决方案


推荐阅读