Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPTaskDialog CreateFromResource problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTaskDialog CreateFromResource problem

 Post Reply Post Reply
Author
Message
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTaskDialog CreateFromResource problem
    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
Back to Top
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.090 seconds.