Print Page | Close Window

CXTPTaskDialog CreateFromResource problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8295
Printed Date: 13 November 2025 at 11:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTaskDialog CreateFromResource problem
Posted By: scottp
Subject: CXTPTaskDialog CreateFromResource problem
Date Posted: 04 October 2007 at 8:01am
Hi,

I am loading a task dialog XML definition from my resources using CXTPTaskDialog::CreateFromResource. This has been working great and I am very happy with the results. However I have hit a major problem.

The task dialog XML is included in the resources as a HTML dialog. When our resources DLL is processed by our localisation software it inserts a META tag at the front of the XML:


<META http-equiv="Content-Type" content="text/html; charset=Windows-1252"/>
<?xml version="1.0" encoding="utf-8"?>
<Dialogs>
  <Dialog AllowCancel="True" Name="SecurityError">
  ... etc ...

When trying to load this XML resource the xml parser issues a error as expected:
Warning: CXTPPropExchangeXMLNode::LoadFromString failed. ParseError.Reason = Only one top level element is allowed in an XML document.

Does anyone have any good ideas to get around this problem?

Thanks,

Scott



Replies:
Posted By: scottp
Date Posted: 04 October 2007 at 10:36am
I think I may have solved my problem by ensuring the XML resource file is really in utf-8 format. The localisation software now does not add the META tag.
Hopefully the XML resource will parse as expected once I get this change into the production build.



Posted By: Oleg
Date Posted: 05 October 2007 at 3:09am
Hello,
It was  right error. valid XML file must have only one root element.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net