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  |  

Vote for DotNetNuke as your choice for winner of this year's PackT Open Source CMS Award
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  XML Module [Lea...  How to Create a consumable XML Document from DNN Based Data
Previous Previous
 
Next Next
New Post 4/3/2008 7:23 AM
User is offline John
215 posts
ewds.strath.ac.uk
9th Ranked


Re: How to Create a consumable XML Document from DNN Based Data 

I've played around with ourputting information from xmod with a good deal of success.
There are a couple of modules out there taht would allow you to produc an xml document using T-SQL through database access and the For XML statement.

Xmod only store the form itself in xml form the actually data is stored in the database in value pair groups over 5 tables for size optimisation. XMod combine the dtafrom these diverse location in the programatic logic rather than the database. However, I have a snippet of SQL that will retrieve the value for a given form and xMOD id(record) also it will return addition inforamtion such as user created /modified as well as dates.

/****** Object: StoredProcedure [dbo].[getXMODRecordNText]    Script Date: 04/03/2008 15:19:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
CREATE PROCEDURE [dbo].[getXMODRecordNText]
       @formID int
       ,@record int
AS
 
DECLARE @sql NVARCHAR(40)
 
CREATE TABLE #datevalues
(
      UserDefinedRowID int NOT NULL
      ,FieldTitle varchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT 'CreatedAt'
      ,FieldValue nvarchar(2000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
 
CREATE TABLE #alltogether
(
      FieldTitle varchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT 'CreatedAt'
      ,FieldValue ntext COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
 
--DROP TABLE #createdtemp
 
INSERT INTO #datevalues
   SELECT XModId AS UserDefinedRowID,'CreatedAt', DateAdded AS FieldValue
FROM         KB_XMod_Modules
WHERE     (formId = @formID)
 
INSERT INTO #datevalues
   SELECT XModId AS UserDefinedRowID,'CreatedBy', AddUser AS FieldValue
FROM         KB_XMod_Modules
WHERE     (formId = @formID)
 
INSERT INTO #datevalues
   SELECT XModId AS UserDefinedRowID,'ChangedAt', DateModified AS FieldValue
FROM         KB_XMod_Modules
WHERE     (formId = @formID)
 
INSERT INTO #datevalues
   SELECT XModId AS UserDefinedRowID,'ChangedBy', UpdateUser AS FieldValue
FROM         KB_XMod_Modules
WHERE     (formId = @formID)
 
INSERT INTO #alltogether
SELECT FieldTitle AS FieldTitle, FieldValue AS FieldValue
FROM #datevalues
Where UserDefinedRowId = @record
 
INSERT INTO #alltogether
SELECT     dbo.KB_XMod_Index_VC50.[key] AS FieldTitle, dbo.KB_XMod_Index_VC50.value AS FieldValue
FROM         dbo.KB_XMod_Index_VC50 JOIN
                      dbo.KB_XMod_Modules ON
                      dbo.KB_XMod_Index_VC50.XmodID = dbo.KB_XMod_Modules.XModId
WHERE     (dbo.KB_XMod_Modules.formId = @formID) AND dbo.KB_XMod_Index_VC50.XmodID = @record
--UNION
INSERT INTO #alltogether
SELECT       dbo.KB_XMod_Index_VC100.[key] AS FieldTitle, dbo.KB_XMod_Index_VC100.value AS FieldValue
FROM      dbo.KB_XMod_Index_VC100 JOIN
                      dbo.KB_XMod_Modules ON dbo.KB_XMod_Modules.XModId = dbo.KB_XMod_Index_VC100.XmodID
WHERE     (dbo.KB_XMod_Modules.formId = @formID) AND dbo.KB_XMod_Index_VC100.XmodID = @record
--UNION
INSERT INTO #alltogether
SELECT       dbo.KB_XMod_Index_VC400.[key] AS FieldTitle, dbo.KB_XMod_Index_VC400.value AS FieldValue
FROM      dbo.KB_XMod_Index_VC400 JOIN
                      dbo.KB_XMod_Modules ON dbo.KB_XMod_Modules.XModId = dbo.KB_XMod_Index_VC400.XmodID
WHERE     (dbo.KB_XMod_Modules.formId = @formID) AND dbo.KB_XMod_Index_VC400.XmodID = @record
--UNION
INSERT INTO #alltogether
SELECT       dbo.KB_XMod_Index_VC2000.[key] AS FieldTitle, dbo.KB_XMod_Index_VC2000.value AS FieldValue
FROM      dbo.KB_XMod_Index_VC2000 JOIN
                      dbo.KB_XMod_Modules ON dbo.KB_XMod_Modules.XModId = dbo.KB_XMod_Index_VC2000.XmodID
WHERE     (dbo.KB_XMod_Modules.formId = @formID) AND dbo.KB_XMod_Index_VC2000.XmodID = @record
--UNION
INSERT INTO #alltogether
SELECT     dbo.KB_XMod_Index_NText.[key] AS FieldTitle, dbo.KB_XMod_Index_NText.value AS FieldValue
FROM         dbo.KB_XMod_Index_NText JOIN
                      dbo.KB_XMod_Modules ON
                      dbo.KB_XMod_Index_NText.XmodID = dbo.KB_XMod_Modules.XModId
WHERE     (dbo.KB_XMod_Modules.formId = @formID) AND dbo.KB_XMod_Index_NText.XmodID = @record
 

SELECT FieldTitle, FieldValue From #alltogether

GO

Using this I have been able to feed a single record into a formatted word document I hope this helps

John


John Nicholson
 
New Post 4/3/2008 8:12 AM
User is offline Stefan Cullmann
1453 posts
6th Ranked








Re: How to Create a consumable XML Document from DNN Based Data 

Well, SQL integration is overdue. In fact, it is already checked in into source repository months ago, and I am already dog fooding it on my sites.However there are some other constraints that needs to be handled before a public release is possible. Currently I don't have the time working on XML module, as I am working on a big new UDT release.

However I am always looking for help, so if you want to volunteer and join the team, please send me an email.


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com

forms & Lists (UDT5.0) will be the next major release of the User Defined Table project.
A first Preview is available, though it requires DotnetNuke 5 (Beta 5).

Need to import external data to a UDT? Try http://www.codeplex.com/Csv2UDTImport

 
New Post 4/3/2008 8:32 AM
User is offline Paul Scarlett
183 posts
www.tressleworks.ca
9th Ranked






Re: How to Create a consumable XML Document from DNN Based Data 

 John wrote

There are a couple of modules out there taht would allow you to produc an xml document using T-SQL through database access and the For XML statement.

 

One such free module is XMLdb from www.tressleworks.ca    /Paul.

 
New Post 4/4/2008 5:31 AM
User is offline Michael G
14 posts
10th Ranked


Re: How to Create a consumable XML Document from DNN Based Data 

Stefan,

I appreciate there are time constraints, and thank you for your help so far.

In terms of 'joining the team' of course I'm willing, but I'm not a module developer, so I can contribute  little at that level.

At this stage I see two practical options :

(1)  Use the tresselworks.ca XMLdb module, which does what I want but does it on an olde version of XML/XSL module, so many of the features added in 'XSL Transformation' are absent

(2)  Somehow ( perhaps by joining the team ?) get access to the version you have in hand.  I can see a preview snapshot in this forum post and it does what I want

Either option leaves me exposing the local DB name and object qualifier to Portal Admins in order to allow Portal Admins set their own transformation, so they are equal in that respect.  The first option is easy and immediately accessible, the second is more functional, but not currently accessible - to someone like me it is 'FutureWare' .

So, can Option 2 be made more accessible in the short term?  Alternatively I'll proceed with the tresselworks module and revert to this forum when the new version is available.

Michael

 
New Post 4/4/2008 11:19 AM
User is offline Michael G
14 posts
10th Ranked


Re: How to Create a consumable XML Document from DNN Based Data 

Thanks John, that got me started.  It works - clearly one has to do a 'data aware' procedure to make the result more meaningful, but straight off this procedure got my data out as XML.  Mind you the XML won't win any prizes, but it'll work.

Michael

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  XML Module [Lea...  How to Create a consumable XML Document from DNN Based Data
 


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.

 


Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net
WEBPC™ DotNetNuke® sites for Small Business
WEBPC™ are internet consultants and web hosters catering to the small business market.
www.webpc.biz
Perpetual Motion Interactive Systems Inc.
A solutions company specializing in Microsoft enterprise technologies.
www.perpetualmotion.ca

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