[XML Records] XML Records The current node (#xxzz) does not match the record definition (xxyy)

Forge Component
(42)
Published on 27 May by João Melo
42 votes
Published on 27 May by João Melo

I am receiving this error:

The current node (#xxxx) does not match the record definition (yyyy)

The root node is actually named "yyyy"


The XML has embedded XML in it.

"<generalDataLoad><![CDATA[<generalDataV1>"


In my structure I named it generalDataLoad and not generalDataV1

Is this the correct way to work with attached XML?


Thank you.



This error has been resolved, it is because of the comment inside the XML before the root node. 

Although my new problem is that I am unable parse the values of the embedded XML inside the XML


The XML has embedded XML in it.

"<generalDataLoad><![CDATA[<generalDataV1>"


I am currently using generalDataLoad as the name of the structure. No error given but the values are not parsed.





Hi Edwin,

When you say you're unable to parse the values, what exactly happens? Do you get the value inside generalDataLoad?

Can you supply us with an XML file example?

Afonso Carvalho wrote:

Hi Edwin,

When you say you're unable to parse the values, what exactly happens? Do you get the value inside generalDataLoad?

Can you supply us with an XML file example?

I am unable to get the value inside GeneralDataLoad.

GeneralDataLoad is just one of the embedded xml and it is coded something like this:


<generalDataload><![CDATA[<generalDataV1><filer><personDetails><salutation>1</salutation><name>EdwinR</name><nationality>SZ</nationality><gender>M</gender><dateOfBirth>1977-07-19Z</dateOfBirth><designation>OTHER</designation><passportIssuingCountry>PH</passportIssuingCountry><officeTelNumber>74234348</officeTelNumber><officeExtn/><homeTelNumber>7345128</homeTelNumber><faxNumber>72345128</faxNumber><mobileNumber>72345128</mobileNumber><email>dataa@data.com</email><alternateEmail/><preferredNotificationMode>S</preferredNotificationMode><professionalInformation><professionalNumber/><professionalFirmName/></professionalInformation></personDetails></filer><applicant><personDetails><salutation>1</salutation><name>Edwin S</name><nationality>SZ</nationality><gender>M</gender><dateOfBirth>1977-07-19Z</dateOfBirth><designation>AGN</designation><designationOther/><passportIssuingCountry>PT</passportIssuingCountry><officeTelNumber>734234348</officeTelNumber><officeExtn/><homeTelNumber>72345128</homeTelNumber><faxNumber>12345128</faxNumber><mobileNumber>72345128</mobileNumber><email>data@data.com</email><alternateEmail/><primaryContactMode>OFF</primaryContactMode><preferredNotificationMode>S</preferredNotificationMode></personDetails><addr><addressType><foreignAddr><addressLine1>augh</addressLine1><addressLine2>augh</addressLine2><addressLine3/><addressLine4/><addressLine5/><city/><state>augh</state><country>PT</country><typeOfPremise>OFFC</typeOfPremise></fAddr></addressType><addressTypeInd>F</addressTypeInd></addr></applicant><organisation><orgNDetails><organisationName>Org name</organisationName><organisationType>LL</organisationType><formerBusinessCompanyRegNumber/></orgNDetails><myAddress><addr><addressType><foreignAddr><addressLine1/><addressLine2/><addressLine3/><addressLine4/><addressLine5/><city/><state/><country>PT</country><type>OFFC</type></fAddr><localAddr><postalCode/><blockHouseNumber/><streetName/><level/><unitNumber/><buildingName/><typeOfPremise>OFFC</typeOfPremise></localAddr></addressType></addr></myAddress><registeredAddress><addr><addressType><localAddr><postalCode>511124842</postalCode><HouseNumber>9042D</HouseNumber><streetName>Street Here</streetName><level>03</level><unitNumber>54</unitNumber><buildingName/><typeOfPremise>OFFC</typeOfPremise></localAddr></addressType></addr></registeredAddress><orgContactDetails><phone><telNumber>98765432</telNumber><extn/></phone><faxNumber/><businessEmail>test@data.com</businessEmail><preferredNotificationMode>S</preferredNotificationMode></orgContactDetails><mailingAddr><addr><addressTypeInd>L</addressTypeInd></addr></mailingAddr></organisation><mailingAddr><localAddr><postalCode>11149929</postalCode><HouseNumber>10</HouseNumber><userType>F</userType></generalDataV1>]]></generalDataload>


Solution

I already resolved the issue by replacing "<![CDATA[" mark-ups.

Thanks again!

Solution

Glad to hear it Edwin.