3 Replies Latest reply on Mar 3, 2009 5:06 PM by Newsgroup_User

    Flex 3 and XML Namespaces

    MixMastaJames Level 1
      I'm trying to edit a imsmanifest.xml file for SCORM with Flex 3 but for some reason, I can't edit any of the content using E4X.. I'm THINKING it has something to do with the namespaces in the XML

      Here is the base XML file for the manifest:

      <?xml version="1.0" encoding="UTF-8"?>
      <manifest identifier="AD73CAD3ED6484754B42E85E3C8D0030" version="1.1"
      xmlns=" http://www.imsproject.org/xsd/imscp_rootv1p1p2"
      xmlns:adlcp=" http://www.adlnet.org/xsd/adlcp_rootv1p2"
      xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation=" http://www.imsproject.org/xsd/imscp_rootv1p1p2 imscp_rootv1p1p2.xsd
      http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd
      http://www.adlnet.org/xsd/adlcp_rootv1p2 adlcp_rootv1p2.xsd">
      <metadata>
      <schema>ADL SCORM</schema>
      <schemaversion>1.2</schemaversion>
      </metadata>

      <organizations default="LINEAR">
      <organization identifier="LINEAR">
      <title>[TITLE]</title>
      <item identifier="[NGCID]" identifierref="[ID]_ref01" isvisible="true">
      <title>[TITLE]</title>
      </item>
      </organization>
      </organizations>
      <resources>
      <resource identifier="[ID]_ref01" type="webcontent" adlcp:scormtype="sco" href="index.html">
      <file href="index.html"/>
      <file href="imsmanifest.xml"/>
      </resource>
      </resources>
      </manifest>

      Can someone help me with that? I'm not sure why it wont' let me edit it, but I'm just taking a guess about the namespaces.
        • 1. Re: Flex 3 and XML Namespaces
          Level 7

          "New to AS3" <webforumsuser@macromedia.com> wrote in message
          news:goj9r8$m02$1@forums.macromedia.com...
          > I'm trying to edit a imsmanifest.xml file for SCORM with Flex 3 but for
          > some
          > reason, I can't edit any of the content using E4X.. I'm THINKING it has
          > something to do with the namespaces in the XML
          >
          > Here is the base XML file for the manifest:
          >
          > <?xml version="1.0" encoding="UTF-8"?>
          > <manifest identifier="AD73CAD3ED6484754B42E85E3C8D0030" version="1.1"
          > xmlns=" http://www.imsproject.org/xsd/imscp_rootv1p1p2"
          > xmlns:adlcp=" http://www.adlnet.org/xsd/adlcp_rootv1p2"
          > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
          > xsi:schemaLocation=" http://www.imsproject.org/xsd/imscp_rootv1p1p2
          > imscp_rootv1p1p2.xsd
          > http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd
          > http://www.adlnet.org/xsd/adlcp_rootv1p2 adlcp_rootv1p2.xsd">
          > <metadata>
          > <schema>ADL SCORM</schema>
          > <schemaversion>1.2</schemaversion>
          > </metadata>
          >
          > <organizations default="LINEAR">
          > <organization identifier="LINEAR">
          > <title>[TITLE]</title>
          > <item identifier="[NGCID]" identifierref="[ID]_ref01"
          > isvisible="true">
          > <title>[TITLE]</title>
          > </item>
          > </organization>
          > </organizations>
          > <resources>
          > <resource identifier="[ID]_ref01" type="webcontent"
          > adlcp:scormtype="sco"
          > href="index.html">
          > <file href="index.html"/>
          > <file href="imsmanifest.xml"/>
          > </resource>
          > </resources>
          > </manifest>
          >
          > Can someone help me with that? I'm not sure why it wont' let me edit it,
          > but
          > I'm just taking a guess about the namespaces.

          It doesn't actually seem to be using those namespaces on the XML itself, but
          I have to ask: why are you trying to edit a manifest file with Flex?


          • 2. Re: Flex 3 and XML Namespaces
            MixMastaJames Level 1
            I'm editing the resources and title, things like that. When a new slide is added to the CBT, or the title of the lesson changes, it updates the manifest file..

            I just can't get it to read or write any nodes... I'm not sure why. It reads it in, if I use toString() on the xml var, it traces it... but I can't get anything else to work.
            • 3. Re: Flex 3 and XML Namespaces
              Level 7

              "New to AS3" <webforumsuser@macromedia.com> wrote in message
              news:gojlu6$70s$1@forums.macromedia.com...
              > I'm editing the resources and title, things like that. When a new slide
              > is
              > added to the CBT, or the title of the lesson changes, it updates the
              > manifest
              > file..
              >
              > I just can't get it to read or write any nodes... I'm not sure why. It
              > reads
              > it in, if I use toString() on the xml var, it traces it... but I can't get
              > anything else to work.

              Sounds like you're not looking at the text() method.