Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  How to navigate result XML
Previous Previous
 
Next Next
New Post 2/4/2006 3:17 PM
User is offline Stefan Kamphuis
319 posts
www.superska.net
8th Ranked






How to navigate result XML 
Modified By Stefan Kamphuis  on 2/4/2006 6:18:31 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.


Greetz,
Stefan Kamphuis
 
New Post 2/6/2006 6:42 AM
User is offline Jon Henning
1623 posts
www.codeendeavors.com
5th Ranked










Re: How to navigate result XML 

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 12:32 PM
User is offline Stefan Kamphuis
319 posts
www.superska.net
8th Ranked






Re: How to navigate result XML 
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).


Greetz,
Stefan Kamphuis
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  How to navigate result XML
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Adaptive InfoSystems, Inc.
We provide custom programming and various levels of support for DotNetNuke and the .Net framework.
www.aisysweb.com
Multipartner Virtual Data Rooms
The Virtual Data Rooms (VDR) provided by an expert advisor, far from any ordinary software company!, supporting the sellers and their consultants. Multipartner builds and services higly professional Virtual Data Rooms (VDR) specifically tailored to M&A, Real Estate and NPL deals.
www.multipartner.com
DNN SEO
Seablick Consulting specializes in DNN search engine optimization (SEO), DNN consulting, as well as support & training.
seablick.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP