XML - 只允许一个顶级错误 - 无法找到根元素的错误

时间:2015-02-12 15:06:05

标签: xml

我对XML编码很新,目前正在阅读它。我从Flash游戏中获得了一个设置文件,我正在尝试使用它来了解它是如何工作的,更改问题,更改正确的答案等。

使用XMLVP打开它后,我得到了顶级错误。我读到应该只有一个根元素应该是<?xml version="1.0" encoding="UTF-8"?>,但我在这个早期阶段并不熟悉。

<?xml version="1.0" encoding="UTF-8"?>
<Title>Who wants to be a Millionaire?!</Title>
<Random>yes</Random>
<AllQuestions>

<Q>
<question>Pertains to a Payee that is approved by the client for processing?</question>
<answer>3</answer>
<choice_1>Manual Payee</choice_1>
<choice_2>Unacceptable Payee(s)</choice_2>
<choice_3>Acceptable Payee(s)</choice_3>
<choice_4>Auto Payee Verification</choice_4>
</Q>
<Q>

<Q>
<question>It’s the Manual Verification of payee names by an individual</question>
<answer>4</answer>
<choice_1>Payee List</choice_1>
<choice_2>Acceptable Payee(s)</choice_2>
<choice_3>Endorsement</choice_3>
<choice_4>Manual Payee Verification</choice_4>
</Q>
<Q>


<Q>
<question>What do you call the list of payee names for MPV?</question>
<answer>2</answer>
<choice_1>Acceptable Payee(s)</choice_1>
<choice_2>Payee List</choice_2>
<choice_3>Unacceptable Payee(s)</choice_3>
<choice_4>Default Payee(s)</choice_4>
</Q>
<Q>


<Q>
<question>What are the 4 Payee Groups?</question>
<answer>4</answer>
<choice_1>Acceptable Payee(s)</choice_1>
<choice_2>Abbreviations & Default Payee(s)</choice_2>
<choice_3>Unacceptable Payee(s)</choice_3>
<choice_4>All of the Above</choice_4>
</Q>
<Q>


<Q>
<question>What does an Asterisk (*) symbol next to a payee name mean?</question>
<answer>3</answer>
<choice_1>Plus Everything</choice_1>
<choice_2>Plus Nothing</choice_2>
<choice_3>Plus Anything</choice_3>
<choice_4>Plus Acceptable Name</choice_4>
</Q>
<Q>


<Q>
<question>True or False: When validating payees, is it acceptable to combined words from a list of payees?</question>
<answer>1</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Both</choice_3>
<choice_4>Maybe</choice_4>
</Q>
<Q>


<Q>
<question>This is a term used to identify the recipient of the fund. </question>
<answer>4</answer>
<choice_1>Default Payee</choice_1>
<choice_2>Unacceptable Payee</choice_2>
<choice_3>Acceptable Payee</choice_3>
<choice_4>Payee</choice_4>
</Q>
<Q>


<Q>
<question>True or False: When reviewing a payee name with a hyphen (-), we must make sure both of the payees on the check are acceptable</question>
<answer>1</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Both</choice_3>
<choice_4>Maybe</choice_4>
</Q>
<Q>


<Q>
<question>True or False: When reviewing a payee name with a slash (/), we must we make sure both of the payees on the check are acceptable.</question>
<answer>2</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Both</choice_3>
<choice_4>Maybe</choice_4>
</Q>
<Q>


<Q>
<question>What does “FBO” stand for? </question>
<answer>2</answer>
<choice_1>Failed Benefit Of</choice_1>
<choice_2>For the Benefit Of</choice_2>
<choice_3>Further Benefits of</choice_3>
<choice_4>Far Benefits of</choice_4>
</Q>
<Q>


<Q>
<question>“BankOne” considered as a Default Payee?</question>
<answer>1</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Both</choice_3>
<choice_4>Maybe</choice_4>
</Q>
<Q>


<Q>
<question>Do we process a check payable to “Cash”?</question>
<answer>1</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Maybe</choice_3>
<choice_4>Both</choice_4>
</Q>
<Q>


<Q>
<question>True or False: A check stamped “Per Env” can be processed under “All Payees”?</question>
<answer>1</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Maybe</choice_3>
<choice_4>Both</choice_4>
</Q>
<Q>


<Q>
<question>True or False: A check stamped “Per Mat” can be processed under “All Payees”?</question>
<answer>1</answer>
<choice_1>True</choice_1>
<choice_2>False</choice_2>
<choice_3>Maybe</choice_3>
<choice_4>Both</choice_4>
</Q>
<Q>


<Q>
<question>An endorsement is a signature or stamp on the back of a check to?</question>
<answer>4</answer>
<choice_1>Make it payable</choice_1>
<choice_2>Approve Payment</choice_2>
<choice_3>Trnsfr Ownrshp frm 1 prty to anthr</choice_3>
<choice_4></choice_4>
</Q>
<Q>


</AllQuestions>

1 个答案:

答案 0 :(得分:3)

<?xml version="1.0" encoding="UTF-8"?>是XML声明,而不是根元素。您的示例是XML格式良好的片段(特别是它是“well-formed external parsed entity”)但它不是格式良好的XML 文档,因为它具有三个单独的根级元素TitleRandomAllQuestions

格式良好的XML文档必须在根级别只有一个元素,因此您需要将这三个元素包装在单个根级元素中,以使其成为一个良好的元素。形成XML文档。