0

所以我的问题是,作为我工作的一部分,我必须在定期报告中完成表格格式的单词。然后,我必须上网并使用报告中的所有信息填写在线表格。该表单确实接受 XML 文件上传以填写报告,因此我一直在尝试找到一种方法将在报告中输入的信息转换为 XML 文件。

我尝试将 word 文档直接转换为 XML,但捕获了很多额外信息(样式等),因此在线门户不接受该文件。

我尝试将数据添加到 excel 并将其导出为 XML,但 excel 无法导出它。

我在想是否有一种方法可以根据表格的哪些部分已填写的内容来读取我的文档并写入纯文本文档?

这是 XML 的示例

<?xml version="1.0"?>
<Declaration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://oris.ctif-cfi.be/Declaration.xsd">
    <AuthorizedPerson>
        <AuthorizedPersonId>TEST</AuthorizedPersonId>
        <Abbreviation>TEST</Abbreviation>
        <Name>TEST</Name>
    </AuthorizedPerson>
    <Disclosure>
        <ExternalReference>TESTINGREF</ExternalReference>
        <DisclosureType>2</DisclosureType>
        <Urgency>Urgent</Urgency>
        <InternalReference xsi:nil="true" />
        <ReferenceDossier>DVTESTCOMPLE</ReferenceDossier>
        <DeclarationDate>1900-01-01</DeclarationDate>
        <SessionId xsi:nil="true" />
    </Disclosure>
    <Subject>
        <SubjectType>Physical</SubjectType>
        <PhysicalSubject>
            <Name>TestLast1</Name>
            <FirstName>TestFirst1</FirstName>
            <BirthDate>2000-01-01</BirthDate>
            <BirthPlace>Kumasi</BirthPlace>
            <BirthCountry>BE</BirthCountry>
            <NationalRegister>00000000</NationalRegister>
            <Activity />
            <Nationality>MN</Nationality>
            <Location>
                <Address>
                    <Street>TestStreet1</Street>
                    <Number>23</Number>
                </Address>
                <ZipCode>18000</ZipCode>
                <City>TestCity1</City>
                <Country>AO</Country>
            </Location>
            <Document>
                <DocumentType>3</DocumentType>
                <DocumentDescription>Passport</DocumentDescription>
                <Number>1234567890</Number>
                <ValidUntil>2020-12-12</ValidUntil>
                <Country>AM</Country>
            </Document>
        </PhysicalSubject>
    </Subject>
    <Subject>
        <SubjectType>Physical</SubjectType>
        <PhysicalSubject>
            <Name>TestLast2</Name>
            <FirstName>TestFirst2</FirstName>
            <BirthDate>1960-01-09</BirthDate>
            <BirthPlace />
            <BirthCountry>n/a</BirthCountry>
            <NationalRegister>0000000000</NationalRegister>
            <Activity />
            <Nationality>ZM</Nationality>
            <Location>
                <Address>
                    <Street>TEST ADDRESS2</Street>
                    <Number>11</Number>
                </Address>
                <ZipCode>16000</ZipCode>
                <City>TESTCITY</City>
                <Country>LT</Country>
            </Location>
        </PhysicalSubject>
    </Subject>
    <TransactionDescription>
        <ZipCodeBranch>0000</ZipCodeBranch>
        <ZipCodeOperation />
        <Description>TEST DESCRIPTION OF FACTS</Description>
    </TransactionDescription>
    <Indications>
        <Art10bis>false</Art10bis>
        <Description>TEST INDICATIONS</Description>
    </Indications>
    <Investigation>
        <Known>false</Known>
        <ReferenceFile />
        <IdentificationService />
        <AnalystName />
        <GeneralComment />
    </Investigation>
    <GeneralComments>
        <GeneralComment>TEST GENERAL COMMENTS</GeneralComment>
    </GeneralComments>
</Declaration>
4

0 回答 0