Multiple Root Elements?
Multiple Root Elements?
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?
Last edited by dwag on Fri Sep 28, 2012 4:55 am, edited 1 time in total.
-
- Sr. Propeller Head
- Posts: 457
- Joined: Thu Sep 16, 2010 6:31 am
- Location: London
Re: Multiple Root Elements?
Post your code.
Re: Multiple Root Elements?
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>
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>
-
- Sr. Propeller Head
- Posts: 457
- Joined: Thu Sep 16, 2010 6:31 am
- Location: London
Re: Multiple Root Elements?
Probably the easiest fix I've ever been able to give. Glad you figured it out.