gpt4 book ai didi

java - 查找未在 java 中关闭的 xml 标记

转载 作者:行者123 更新时间:2023-11-29 05:40:43 24 4
gpt4 key购买 nike

<分区>

我有以下字符串:

<table:table-cell table:style-name="Table2.A1" office:value-type="string">
<text:p text:style-name="P32">
<text:span text:style-name="T1">test description</text:span>
<text:span text:style-name="T2"> </text:span>
<text:span text:style-name="T1">17/07/2013</text:span>
<text:span text:style-name="T2"> </text:span>
<text:span text:style-name="T1">test</text:span>
<text:span text:style-name="T2"> </text:span>
<text:span text:style-name="T1">test</text:span>
<text:span text:style-name="T3"></text:span>
<text:span text:style-name="T1">test</text:span>
<text:span text:style-name="T3">test <!-- end tag is missing -->
</text:p>
</table:table-cell>

有没有办法找到未闭合的标签并插入?

预期输出:

<table:table-cell table:style-name="Table2.A1" office:value-type="string">
<text:p text:style-name="P32">
<text:span text:style-name="T1">test description</text:span>
<text:span text:style-name="T2"> </text:span>
<text:span text:style-name="T1">17/07/2013</text:span>
<text:span text:style-name="T2"> </text:span>
<text:span text:style-name="T1">test</text:span>
<text:span text:style-name="T2"> </text:span>
<text:span text:style-name="T1">test</text:span>
<text:span text:style-name="T3"></text:span>
<text:span text:style-name="T1">test</text:span>
<text:span text:style-name="T3">test</text:span>
</text:p>
</table:table-cell>

提前致谢

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com