all groups > sql server notification services > march 2007 >
You're in the

sql server notification services

group:

XML fieldtype for SSNS, or alternatives. Please help.



XML fieldtype for SSNS, or alternatives. Please help. bs
3/8/2007 12:08:28 PM
sql server notification services: Im glad I came across this group.

I really need help on SSNS for a very important project. I need to use the xml data type for my notifications, but cannot find any resources on how I can use it, extract data from it or format it.

Here is an example of an event xml structure i need to create ans use:
<agent>
<agentid>1</agentid>
<agentname>John Doe</agentname>

<news type="stockexchange">
<title>Today's Stock Exchange News</title>
<newsitem>
<name>ABC company</name>
<symbol>ABC</symbol>
<newstype>Increase</newstype>
<summary>Loren Ipsum ...</summary>
</newsitem>
<newsitem>
<name>BDC company</name>
<symbol>BDC</symbol>
<newstype>Increase</newstype>
<summary>Loren Ipsum ...</summary>
</newsitem>
</news>
<news type="tech">
<title>Today's Tech News</title>
<newsitem>
<name>ABC company</name>
<symbol>ABC</symbol>
<newstype>Increase</newstype>
<summary>Loren Ipsum ...</summary>
</newsitem>
<newsitem>
<name>BDC company</name>
<symbol>BDC</symbol>
<newstype>Increase</newstype>
<summary>Loren Ipsum ...</summary>
</newsitem>

</news>

</agent>

each agent will receive an email containing only news pertinent to them. how should i go about doing this? I initially tried creating a field with fieldtype xml, but havent had any success.

Please help







From http://www.developmentnow.com/g/110_2006_12_0_0_0/sql-server-notificationsvcs.htm

Posted via DevelopmentNow.com Groups
Re: XML fieldtype for SSNS, or alternatives. Please help. Joe Webb
3/13/2007 4:35:14 PM
[quoted text, click to view]



Unfortunately, XML field types are not allowed in SSNS.
When you create or update an instance, the ADF and ICF
are validated against an XSD file. Attempting to use the
XML field type would invalidate the document, causing the
create or update to fail.

Hacking the XSD file to allow the XML field type would be
ill-advised.

In an upcoming article on Simple-Talk, I illustrate how you
can create a custom content formatter that 1) receives some
key data from SSNS, 2) retrieves additional information from
a database based on the key data received, and 3) formats
the resulting dataset based on an XSLTransform.

I think this would help you to accomplish what you're trying
to do with the XML field type.

Cheers!

Joe



--
Joe Webb
SQL Server MVP
http://www.sqlns.com



Re: XML fieldtype for SSNS, or alternatives. Please help. Joe Webb
4/24/2007 11:40:49 AM
[quoted text, click to view]

Here's the article I mentioned in the prior posting.

http://www.simple-talk.com/sql/sql-server-2005/creating-a-custom-content-formatter-for-ssns-2005/

HTH...

--
Joe Webb
SQL Server MVP
http://www.sqlns.com



AddThis Social Bookmark Button