2 Replies Latest reply on Dec 14, 2008 10:53 PM by

    Problem with accessing XML nodes having namespace

      I have an XML file with following format;

      <graphml version="1.3" xmlns=" http://graphml.graphdrawing.org/xmlns/graphml" xmlns:y=" http://www.yworks.com/xml/graphml" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">

      <graph id="G" edgedefault="directed">

      <data key="d11">
      <y:Brush name="SolidBrush" color="Black" id="1"/>

      <node id="G:n0">

      <node id="G:n1">



      I am accessing this file as <mx:XML id="layoutXml" source="tmp.xml" />

      I have debug application and found the layoutXml object contains xml file as it is. Now when i am trying to access any child node of layoutXml, every time i found null. Even statement layoutXml.graph.toXMLString() or layoutXml.graph.toString() returns null.

      I have tryied the following approach as well but did not work,
      var nameSpace:Namespace = new Namespace(" http://www.yworks.com/xml/graphml");
      var str:String = layoutXml.graph.node.(@id =="G:n0").nameSpace::Labels.nameSpace::Text.toXMLString();
      this also returns null.

      If any one having the solution , please reply.