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...Module ForumsModule ForumsXMLXMLCan XML module be used for a searchCan XML module be used for a search
Previous
 
Next
New Post
2/2/2009 10:15 AM
 

I want to add search functionality to my site.  I have an XML file holding data on individuals a total of 1500 or so - Just simple fileds, Name, Company, Phone ...

I would like to be able to create a search to find individuals who meet a certain criteria.  Can this be done with XML module?  I cannot figure out how to integrate a form where the criteria can be passed to conduct the search.  I understand that forms cannot be included in DNN pages.  Is there a way to have a form that is filled in where the search criteria can be passes to the XML module to process a search?

I have been able to do a crude search with a static variable that I supply but I would like to use user supplied criteria to conduct the search.  I am not a wiz at XML but I think I can get there if I know what I am attempting to do is possible.  Can it be done with XSL or Xforms?

Thanks in advance for any suggestions or comments.

Dan Stauffer

 
New Post
2/2/2009 3:51 PM
 

Move Data from XML to DB
If the data is read-only then I would not recommend leaving the source as XML with 1500+ elements.  Data in XML format is very bloated -- you would not want to repeatedly parse the source XML (for every search request) if you didn't have to.

If you can import the XML to a table in your DB then there are a number of modules that allow you to search and present data.  A couple of free ones with search options are SQLView and AdvancedDatagrid.  SQLView also supports querystring parameters (makes it easy to declare multiple search items).
 

Using XML Directly
If you MUST leave the data as an XML file then you might be interested in the eventual answer (at the bottom) to this post:

   http://www.codingforums.com/archive/index.php/t-113307.html

Such a solution could be implemented with the XML module.  If you're just getting your feet wet with handling XML in DNN then check out this post for a simple example with the "News Feeds" module:  http://www.eguanasolutions.com/DNN_Blog/EntryID/12.aspx

 
Besides the javascript-enabled solution (above), another option might be to employ EXSLT (though I have not yet tried EXSLT with DNN):

   EXSLT home:  http://www.exslt.org/

   Examples (including search):  http://www.ibm.com/developerworks/library/x-exslt.html


Good luck-
-mamlin


esmamlin atxgeek.me
 
New Post
2/8/2009 11:08 AM
 

Dan,

you can use a form, see a simple example with one single textbox here:
http://www.dotnetnuke.com/Products/Development/Forge/ModuleXML/Examples/AmazonCustomQuery/tabid/1035/Default.aspx

 
New Post
2/9/2009 11:26 AM
 

Thanks for both suggestions.

Stefan,  I think your expample is what I am looking for.  I looked at it prior to posting and I did not notice that you did inculde a form search field that is used in the search.  I have not tried it yet but what you have there might get me where I need to go.  I will give it a try.  Thanks Dan

 
New Post
2/9/2009 2:17 PM
 

mamlin wrote
 

...Besides the javascript-enabled solution (above), another option might be to employ EXSLT (though I have not yet tried EXSLT with DNN):

   EXSLT home:  http://www.exslt.org/

   Examples (including search):  http://www.ibm.com/developerworks/library/x-exslt.html

 
Update to my previous response regarding EXSLT:
 
It appears that EXSLT use in the XML module has been restricted (prohibited) by a change to the XML module that no longer permits the running of scripts as part of the transform.  You CAN use XML module with EXSLT but you'll have to change the source code to allow scripts.

See this post for related info on the issue:
http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/59/threadid/121322/scope/posts/Default.aspx

...and see this post for the workaround (if you're willing to alter core XML module code):
http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/59/threadid/256528/scope/posts/Default.aspx

-mamlin


esmamlin atxgeek.me
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLCan XML module be used for a searchCan XML module be used for a search


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