We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

XML to HTML error

Hi Team,
I’m trying to convert the xml to HTML. But I’m getting error “Project is not format” .
Use the below code:-

// load the XML in an object of Project class<a class="attachment" href="/uploads/discourse_instance3/65328">3de8a793-59ac-4d59-a813-992479e64d2d.zip</a> (9.2 KB)

Attach as actual xml file
var project = new Project(System.IO.File.ReadAllText(@“D:\data.xml”));
// save XML as HTML
project.Save(“output.html”, Aspose.Tasks.Saving.SaveFileFormat.HTML);

@Satyjeet,
the attached file doesn’t look like a valid Microsoft Project’s XML file.

Your file:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href ='CCMGxsl.xsl'?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cda="urn:hl7-org:v3" xmlns:sdtc="urn:hl7-org:sdtc" xmlns="urn:hl7-org:v3">
  <realmCode code="US" />
  <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040" />
  <templateId root="2.16.840.1.113883.10.20.22.1.1" extension="2015-08-01" />
  <templateId root="2.16.840.1.113883.10.20.22.1.2" extension="2015-08-01" />
  <id root="2.16.840.1.113883.3.8706" extension="1e4192cea" />
  <code code="34133-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Summarization of episode note" />
  <title>CCMG - Clinical Summary: Privacy Segmented Document</title>
  <effectiveTime value="20220615" />
  <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25" />
  <languageCode code="en-US" />
  <recordTarget typeCode="RCT" contextControlCode="OP">
[...]

Example of MS Project-generated XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Project xmlns="http://schemas.microsoft.com/project">
	<SaveVersion>14</SaveVersion>
	<BuildNumber>16.0.14332.20324</BuildNumber>
	<Name>Project_6_to_6.xml</Name>
	<GUID>185ACF8F-C6FD-EC11-AFF2-74DFBF46142E</GUID>
	<Title>Project6</Title>
	<Author>FFFFTTTT</Author>
	<CreationDate>2022-07-07T09:00:00</CreationDate>
	<LastSaved>2022-07-07T14:30:00</LastSaved>
	<ScheduleFromStart>1</ScheduleFromStart>
	<StartDate>2022-07-07T09:00:00</StartDate>
	<FinishDate>2022-07-08T06:00:00</FinishDate>
	<FYStartDate>1</FYStartDate>
	<CriticalSlackLimit>0</CriticalSlackLimit>
	<CurrencyDigits>2</CurrencyDigits>
	<CurrencySymbol>₽</CurrencySymbol>
	<CurrencyCode>RUB</CurrencyCode>
	<CurrencySymbolPosition>3</CurrencySymbolPosition>
	<CalendarUID>1</CalendarUID>
	<DefaultStartTime>09:00:00</DefaultStartTime>
	<DefaultFinishTime>18:00:00</DefaultFinishTime>
[...]