AnsweredAssumed Answered

XML parsing issue !!

Question asked by power on Nov 10, 2008
Latest reply on Nov 10, 2008 by power
Friends,

I face some strange issue. My scheduler will call my javascript every 5min that will parse XMLs and categorize it.

Now I face problem parsing below XML


<?xml version="1.0" encoding="UTF-8"?>
<media>
<media_type>Net Package Broadband</media_type>
<metadata>
<title>Manager 1 Man United 1</title>
<abstract>Manager 1 Manager Utd 1</abstract>
<week_number>9</week_number>
<match>
<match_pa_id>3003583</match_pa_id>
<match_round>9</match_round>
<match_name>Manager v Manager Utd</match_name>
<home_team_pa_id>8</home_team_pa_id>
<home_team_name>Managerrton</home_team_name>
<away_team_pa_id>12</away_team_pa_id>
<away_team_name>Manager United</away_team_name>
<home_score>1</home_score>
<away_score>1</away_score>
<match_status>Result</match_status>
</match>
</metadata>
<asset>
<rights>
<copyright>Colcutta Premier League</copyright>
<releaseTime format="GMT">2008-10-27T00:00:00</releaseTime>
<expireTime format="GMT">2008-11-03T00:00:00</expireTime>
</rights>
<properties>
<fileformat/>
<filesize unit="bytes">0</filesize>
<duration unit="seconds">119.60</duration>
<videoCodec>Jpeg Keyframes</videoCodec>
<width unit="pixels">720</width>
<height unit="pixels">576</height>
<videoFrameRate unit="frames/second"/>
<videoRate unit="kbits"/>
<audioCodec/>
<audioChannels/>
<audioRate unit="kbits"/>
<filename>3003583_019_7_1.jpeg</filename>
</properties>
</asset>
</media>

I validated above xml that is purly true. No error is there.
but when my alfresco tries to parsing it it gives following errors:


Cannot parse XML: The processing instruction target matching "[xX][mM][lL]" is not allowed. (AlfrescoScript#27)

and that line is following in my javascript.


var l_match_metadata_E4X = new XML(l_match_metadata_str);

Here it is validated and my console says errors..  what could be the issue?
I am here confusing regarding problem.


Thanks anybody have clue..

Outcomes