2 Replies Latest reply on Jul 23, 2012 2:11 AM by flexercised

    Error in Parsing XML using <fx:XML/> [Error- 1090: XML parser failure: element is malformed]

    Abhinav Sharma Level 2

      Hi All,

       

      I am getting error while loading XML in <fx:XML> tag.

       

      Error:

      TypeError: Error #1090: XML parser failure: element is malformed.

       

      MXML Code:

      <fx:Declarations>
      <fx:XML id="xmlSource2" source="sample.xml"/>
      </fx:Declarations>

       

       

       

      Sample XML Used: (sample.xml)

      <?xml version="1.0" encoding="UTF-8"?>
      <File>
          <Chemical id="000035676" displayFormula="C39-H45-N2-O6"
              displayName="Dimethyltubocurarine">
              <NameList>
                  <NameOfSubstance>
                      Dimethyltubocurarine
                      <SourceList>
                          <Source>MESH</Source>
                      </SourceList>
                  </NameOfSubstance>
                  <SystematicName>
                      Tubocuraranium, 6,6',7',12'-tetramethoxy-2,2',2'-trimethyl-
                      <SourceList>
                          <Source>NLM</Source>
                      </SourceList>
                  </SystematicName>
                  <Synonyms>
                      Dimethyltubocurarine
                      <SourceList>
                          <Source>NLM</Source>
                      </SourceList>
                  </Synonyms>
                  <Synonyms>
                      Dimethyltubocurarinium
                      <SourceList>
                          <Source>NLM</Source>
                      </SourceList>
                  </Synonyms>
                  <Synonyms>
                      Methyltubocurarinum
                      <SourceList>
                          <Source>NLM</Source>
                      </SourceList>
                  </Synonyms>
              </NameList>
              <NumberList>
                  <CASRegistryNumber>
                      35-67-6
                      <SourceList></SourceList>
                  </CASRegistryNumber>
                  <RelatedRegistryNumber>
                      518-26-3 (iodide.hydriodide)
                      <SourceList>
                          <Source>MESH</Source>
                      </SourceList>
                  </RelatedRegistryNumber>
              </NumberList>
              <ClassificationList>
                  <ClassificationCode>
                      Neuromuscular nondepolarizing agents
                      <SourceList>
                          <Source>MESH</Source>
                      </SourceList>
                  </ClassificationCode>
              </ClassificationList>
              <FormulaList>
                  <MolecularFormula>
                      C39-H45-N2-O6
                      <SourceList>
                          <Source>NLM</Source>
                      </SourceList>
                  </MolecularFormula>
              </FormulaList>
              <FormulaFragmentList></FormulaFragmentList>
              <NoteList></NoteList>
              <LocatorList>
                  <FileLocator
                      url="http://cnetdb.nci.nih.gov/cgi-bin/srchcgi.exe?DBID=****3&SFMT=****_basic%2F10%2F0%2F0&TYPE=search&SRCHFORM=passthru%3D%Asrchform%3ASRCH%3A&FIELD_001=[CAS]35-67-6&#38;GoButton=Search&#38;FIELD_001_CTL=EXPR&#38;FIELD_908=&#38;FIELD908_CTL=HASABSTRACT&#38;FIELD_903=&#38;FIELD_903_CTL=YEARFORE&#38;DOCPAGE=10">CANCERLIT</FileLocator>
                  <FileLocator
                      url="http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+toxline:@and+@term+@rn+35-67-6+@term+@org+DART">DART/ETIC</FileLocator>
                  <FileLocator
                      url="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=search&db=PubMed&term=35-67-6[ECNO]+OR+&#34;~&#34;[MH]">MEDLINE</FileLocator>
                  <FileLocator
                      url="http://www.nlm.nih.gov/cgi/mesh/2K/MB_cgi?term=35-67-6&rn=1">MESH</FileLocator>
                  <FileLocator
                      url="http://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+toxline:@term+@rn+35-67-6+@OR+@mh+""">TOXLINE</FileLocator>
              </LocatorList>
          </Chemical>
      </File>
      

       

       

      Also, when I am using HttpService to load same XML I am getting no such error!!

       

      <s:HTTPService id="employeeService"
                             url="sample.xml"
                             result="employeeService_resultHandler(event)"
                             fault="employeeService_faultHandler(event)"/>
      

       

       

      Please help!!

       

       

      Thanks.

       

      Abhinav