Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIHow to navigate result XMLHow to navigate result XML
Previous
 
Next
New Post
2/4/2006 6:17 PM
 
Hi,

Knowing I'm not exactly a javascript guru, I started playing around with Jon's HelloAjax sample module. The sample return a single string value and alerts it. I changed this to return a simple XML document:
<HelloAjax>
    <Message>blabla</Message>
    <DateTime>2/5/2006 12:02:53 AM</DateTime>
</HelloAjax>


In the clientside script I want to navigate through this xml document and (for example) give an alert with the contents of the <Message> element. I have the following code now, which results in an alert saying "<Message>blabla</Message>" (so this includes the element tags):

function successFunc(result, ctx)
{

    var dom = new dnn.xml.createDocument();
    dom.loadXml(result);

    var topNode = dom.childNodes(0);
    var msgNode = topNode.childNodes(0);

    alert('Message: ' + msgNode.getXml());

}

Any ideas on how I should navigate through the XML to get to an element and get it's contents?

Thanks.


Web applications, DNN websites, modules, skins and support
 
New Post
2/6/2006 9:42 AM
 

Looks like you are on the right path for keeping it cross-browser compatible by using the clientapi for your xml parsing.  I think what you are looking for is the findNode method.

See the ClientAPI documentation for a list of methods available.  (Click on the xml link in the tree on the left).


 
New Post
2/6/2006 3:32 PM
 
Cross-browser compatibility is exactly the reason to use the ClientAPI. I looked into my local clientapitests folder, but that contained only a few methods. Thanks for the link (and the great job on the API).


Web applications, DNN websites, modules, skins and support
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIHow to navigate result XMLHow to navigate result XML


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out