> The xml file below is a response from a Live Meeting service. I need to
> extract the following two fields: mid and audienceInviteText
[quoted text clipped - 3 lines]
>
> set xmlbody = createobject("Msxml2.DOMDocument")
This newsgroup is about XML and the .NET framework. If you use the .NET
framework then you should not use MSXML but rather use the classes in
System.Xml, like XmlReader or XPathDocument/XPathNavigator or XmlDocument.
> xmlbody.loadXML("c:\MeetingResponse.xml")
The loadXML method takes a string with XML, not a file name. Use the
load method if you want to load from a URL or file e.g.
If xmlbody.load("C:\MeetingResponse.xml") Then
' parse out values here
Else
' deal with xmlbody.parseError here
End If
> Set replynode =
> xmlbody.selectSingleNode("//CreateMeetingReply/MeetingReply/OptionList")
Set
xmlbody.setProperty "SelectionLanguage", "XPath"
firsdt with Msxml2.DOMDocument, then call selectSingleNode or
selectNodes with an XPath expression.
> Set myAtt = replynode.getAttributes.GetNamedItem("mid")
> msgbox myAtt.Value
[quoted text clipped - 29 lines]
> http://r.office.microsoft.com/r/rlidLiveMeeting?p1=7&p2=en_US&p3=LMInfo&
amp;p4=support"
> name="audienceInviteText"></StringOption>
Use e.g.
Set optionList =
xmlbody.selectSingleNode("PlaceWareConfCenter/CreateMeetingReply/MeetingReply/OptionList")
Set midValue = optionList.selectSingleNode("StringOption[@name =
'mid']/@value")
Set inviteValue = optionList.selectSingleNode("StringOption[@name =
'audienceInviteText']/@value")
' now you can access midValue.value and inviteValue.value e.g.
WScript.Echo midValue.value
WScript.Echo inviteValue.value

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Rafael - 25 Sep 2007 18:32 GMT
Excellent Martin! Exactly what I was looking for.
Thanks,
Rafael
>> The xml file below is a response from a Live Meeting service. I need to
>> extract the following two fields: mid and audienceInviteText
[quoted text clipped - 69 lines]
> WScript.Echo midValue.value
> WScript.Echo inviteValue.value