You have a default xml namespace you need to deal with. Try: default xml namespace = "http://schemas.microsoft.com/winfx/2006/xaml/presentation";
I see another namespcae declared, "x", but it does not appear to be used. Check the archives and docs for more information about xml namespace. Tracy Spratt Lariat Services Flex development bandwidth available ________________________________ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of annelie2008 Sent: Monday, February 09, 2009 7:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] looping through xml (newbie question) Hi, I'm trying to loop through my xml, but I'm having some problems. I thought this would give me all the line nodes, but it's empty: var xmlLines:XMLList = myXmlList..Line; Is that the right way to go about it, or is there another way? Xml code is below. Many thanks, Annelie -------------------------- <?xml version="1.0" encoding="UTF-16"?> <Canvas Margin="5,12,0,0" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml <http://schemas.microsoft.com/winfx/2006/xaml> "> <Canvas Tag="Measure"> <Line X1="0" Y1="0" X2="0" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Line X1="350" Y1="0" X2="350" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Canvas Tag="Column"> <Line X1="0" Y1="0" X2="350" Y2="0" Stroke="Black" StrokeThickness="0.3" /> <Line X1="0" Y1="5" X2="350" Y2="5" Stroke="Black" StrokeThickness="0.3" /> <Line X1="0" Y1="10" X2="350" Y2="10" Stroke="Black" StrokeThickness="0.3" /> <Line X1="0" Y1="15" X2="350" Y2="15" Stroke="Black" StrokeThickness="0.3" /> <Line X1="0" Y1="20" X2="350" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " /> <Glyphs Tag="1Et" Width="14" Height="55.5" Fill="#FF000000" FontRenderingEmSize="14" UnicodeString="q" Canvas.Left="58" Canvas.Top="10" /> <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " /> <Glyphs Tag="1Et" Width="14" Height="55.5" Fill="#FF000000" FontRenderingEmSize="14" UnicodeString="q" Canvas.Left="116" Canvas.Top="-2.5" /> <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " /> <Glyphs Tag="1Et" Width="14" Height="55.5" Fill="#FF000000" FontRenderingEmSize="14" UnicodeString="h" Canvas.Left="174" Canvas.Top="2.5" /> </Canvas> </Canvas> <Canvas Tag="Measure"> <Line X1="350" Y1="0" X2="350" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Line X1="700" Y1="0" X2="700" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Canvas Tag="Column"> <Line X1="350" Y1="0" X2="700" Y2="0" Stroke="Black" StrokeThickness="0.3" /> <Line X1="350" Y1="5" X2="700" Y2="5" Stroke="Black" StrokeThickness="0.3" /> <Line X1="350" Y1="10" X2="700" Y2="10" Stroke="Black" StrokeThickness="0.3" /> <Line X1="350" Y1="15" X2="700" Y2="15" Stroke="Black" StrokeThickness="0.3" /> <Line X1="350" Y1="20" X2="700" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " /> <Glyphs Tag="1Et" Width="14" Height="55.5" Fill="#FF000000" FontRenderingEmSize="14" UnicodeString="w" Canvas.Left="408" Canvas.Top="2" /> </Canvas> </Canvas> <Canvas Tag="Measure"> <Line X1="700" Y1="0" X2="700" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Line X1="1050" Y1="0" X2="1050" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Canvas Tag="Column"> <Line X1="700" Y1="0" X2="1050" Y2="0" Stroke="Black" StrokeThickness="0.3" /> <Line X1="700" Y1="5" X2="1050" Y2="5" Stroke="Black" StrokeThickness="0.3" /> <Line X1="700" Y1="10" X2="1050" Y2="10" Stroke="Black" StrokeThickness="0.3" /> <Line X1="700" Y1="15" X2="1050" Y2="15" Stroke="Black" StrokeThickness="0.3" /> <Line X1="700" Y1="20" X2="1050" Y2="20" Stroke="Black" StrokeThickness="0.3" /> <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " /> <Glyphs Tag="1Et" Width="14" Height="55.5" Fill="#FF000000" FontRenderingEmSize="14" UnicodeString="h" Canvas.Left="758" Canvas.Top="0" /> <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation <http://schemas.microsoft.com/winfx/2006/xaml/presentation> " /> <Glyphs Tag="1Et" Width="14" Height="55.5" Fill="#FF000000" FontRenderingEmSize="14" UnicodeString="h" Canvas.Left="874" Canvas.Top="0" /> </Canvas> </Canvas> </Canvas> ------------------------------