Page 1 of 1

Multiple Root Elements?

Posted: Tue Sep 25, 2012 8:52 am
by dwag
In trying to open a topic that has been part of the help project forever, I'm getting an error that says the file contains invalid XML ... "There are multiple root elements, line 6, position 6." I'm asked whether I want to open the file as text. I open it as text but can't tell what's wrong. Any suggestions?

Re: Multiple Root Elements?

Posted: Tue Sep 25, 2012 9:15 am
by nickatwork
Post your code.

Re: Multiple Root Elements?

Posted: Fri Sep 28, 2012 4:54 am
by dwag
Thanks for suggesting that I post the code. After posting the first 7 lines (see below), I wondered why I hadn't compared the code with the code for a similar topic (concluded I'm a slow thinker) and did so, discovering that line 6 was missing </head> and line 7 was missing <body>.

Thanks, again. All set now.

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="7" MadCap:lastHeight="2371" MadCap:lastWidth="1107">
<head>
<link href="../../../../Resources/Stylesheets/Styles.css" rel="stylesheet" type="text/css" />
<link href="../../../../Resources/TableStyles/Grid Descriptions.css" rel="stylesheet" MadCap:stylesheetType="table" />
<h1>
<MadCap:keyword term="Benefit:Plan Entry" />Benefit Plan Entry</h1>

Lines 6 and 7 required the following:

</head>
<body>

Re: Multiple Root Elements?

Posted: Fri Sep 28, 2012 7:06 am
by nickatwork
Probably the easiest fix I've ever been able to give. Glad you figured it out.