![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Basic problem w/attributes. >Thread Next - Re: Basic problem w/attributes. Re: Basic problem w/attributes.To: NULL Date: 8/1/2005 5:46:00 AM Yes, I was on the wrong node. I ended up using an XPath query (selectNodes) to get where I wanted. Thanks! -- Michael Salamone [eMVP] Entrek Software, Inc. www.entrek.com "Bjoern Hoehrmann" <bjoern@h...> wrote in message news:42f2c82e.357512312@n...... >* Michael J. Salamone wrote in microsoft.public.xml: >> hr = g_pDoc->load(vtFileName, &bIsSuccess); >> >> if (SUCCEEDED(hr)) >> { >> hr = g_pDoc->get_childNodes(&pSessionNodes); > > This fetches the child notes of the root node; the root note is the > parent of the root element (<Sessions>) so this would give you the > Sessions element which does not have a NumRecords attribute. You > would need to query the children of the Sessions node. Consider > > <?xml version='1.0'?> > <!-- Comment --> > <?xml-stylesheet ... ?> > <rootElement /> > > Here the root node (also called document node) is parent of more > than just the root element (also of the comment and the processing > instruction following it), which should explain the difference here. > -- > Björn Höhrmann · mailto:bjoern@h... · http://bjoern.hoehrmann.de > Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de > 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
