Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: reading XML elements with asp >Thread Next - Re: reading XML elements with asp Re: reading XML elements with aspTo: NULL Date: 7/2/2004 4:01:00 PM "sismis" <zbosnjak@g...> wrote in message news:cc3p3b$t0b$1@l...... > > "Joe Fawcett" <joefawcett@h...> wrote in message > news:#7KcygDYEHA.3476@t...... > > "sismis" <zbosnjak@g...> wrote in message > > news:cc3n4e$q1m$1@l...... > > > Hi! > > > > > > I need to fill the database with selected elements from XML, but cant > get > > > them apart. > ... > > Firstly do not use "microsoft.xmldom". Find out what version your server > > has, hopefully version 4.0, and use the specific id, e.g. > > "MsXml2.DomDocument.4.0". > > Next you're better placed if you use XPath to select the nodes you want > > > Thnx, but don't know which version is, server is Win 2000 SP4. > > There is an error: Server object, ASP 0177 (0x800401F3), Invalid ProgID... > Where can I get update? Managed to get a working mix-max. I suppose MsXml2.DomDocument.4.0 comes with .NET? Will install it then. Thanx for the tip, owe you big time :) Dim sourceFile, source, rootElement, HTMLCode sourceFile = Server.MapPath("items.xml") Set source = Server.CreateObject("Microsoft.XMLDOM") source.async = false source.load sourceFile Set rootElement = source.documentElement Set colNodes = rootElement.selectNodes("item") For i = 0 To colNodes.length - 1 Set nodeType = colNodes(i).selectSingleNode("type") Set nodeCode = colNodes(i).selectSingleNode("code") Response.Write i & ") Type: " & nodeType.text & ", Code: " & nodeCode.text & "<br>" Next | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
