gigs wrote:
i have XpathNodeIterator iterator. and i have some "od" attributes
when i took that nodes with that attribute i dont get anything when i
call iterator.Current.GetAttribute("od", "")
Well you will have to provide more details if you want specific help.
Here is a working sample, the XML document is
<?xml version="1.0" encoding="utf-8" ?>
<root>
<foo od="1"/>
<foo od="2"/>
</root>
and the C# code
XPathDocument doc = new XPathDocument(@"..\..\XMLFile2.xml");
XPathNavigator nav = doc.CreateNavigator();
foreach (XPathNavigator nav2 in nav.Select("root/foo"))
{
Console.WriteLine("od: {0}", nav2.GetAttribute("od", ""));
}
which outputs
od: 1
od: 2
If you want help on your specific problem then you need to provide the
XML you have and the exact code you have, all reduced to a minimum but
complete enough to allow us to reproduce the problem.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/