Hi Romola,
You are close.
set objXMLDOM = Server.CreateObject("Microsoft.XMLDOM")
objXMLDOM.LoadXml(RQLRequest)
Set objNodeList = objXMLDOM.selectNodes("//GROUP")
For Each objNode in objNodeList
%>
Group Guid: <%= objNode.getAttribute("guid") %>
Group Name: <%= objNode.getAttribute("name") %>
<%
Next
On Dec 16, 3:06 pm, "Chrzanowski, Romola" <[email protected]>
wrote:
> I will appreciate some assistance if anyone has done something similar. I
> realize that it will be good to move away from ASP, but I started with this
> because of the good example I found from Manuel Schnitger's ASP example code.
> I am writing a plugin to report on a user's details (projects, groups, etc.)
> Right now I am stuck trying to parse the RQL response to this RQL:
>
> <ADMINISTRATION>
> <USER guid="my guid">
> <PROJECTS action="listgroups"/>
> </USER>
> </ADMINISTRATION>
>
> The RQL output is like this:
> <IODATA>
> <PROJECTS>
> <PROJECT guid="project guid 1" name="Project One">
> <GROUPS>
> <GROUP guid="Group guid 1" name="Group One" checked="1"/>
> <GROUP guid="Group guid 2" name="Group Two" checked="1"/>
> </GROUPS>
> </PROJECT>
> <PROJECT guid="project guid 1" name="Project Two">
> <GROUPS>
> ... obviously there may be multiple groups listed within one project.
>
> Although it may be better to move to a different language, for now I would
> like to finish this in ASP if possible. At this simple level, the code works:
>
> Call XMLDom.LoadXML (CStr(RQLRequest))
> Set XMLDom = XMLDom.ObjectByQuery ("//PROJECTS")
> for iCounter=1 to XMLDom.objects.count
> Response.write "iCounter= " + Cstr(iCounter)
> +"</BR>"
> Response.write "Project guid: " +
> XMLDom.objects(iCounter)("guid")+"</BR>"
> Response.write "Project Name: " +
> XMLDom.objects(iCounter)("name")+"</BR>"
> Next
>
> What I can't figure out is how to get to the GROUPS and each GROUP element in
> each of the PROJECT elements.
>
> I will appreciate any advice or assistance.
>
> Thanks in advance.
>
> Romola Chrzanowski
> University Applications Development
> University at Albany
> 518.437.4525
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reddot-cms-users?hl=en.