How to parse xml with Classic asp?

2020-05-03 12:55发布

问题:

Hi I need to parse xml with Classic asp

here is the xml

    <?xml version="1.0" encoding="utf-8"?>
<int xmlns="http://url.com/WebServices">0</int>

I need to get 0

Could you please show me an example for this particular case? thank you

回答1:

ondrejsv is right - XMLDom is easy to learn. It's also a standard, so once you learn it in one language, it's the same in every other language.

Devguru.com has an excellent reference with lots of examples... I've always found it a lot more useful than MSDN.



回答2:

You may do it easily with the MSXML COM library:

Dim xmlDoc
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")

and some MSDN docs.

I don't give you a concrete example for your problem, start with learning DOM - it's easy.