Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Schema File for XML data

 
   Database Help (Home) -> Notification Services RSS
Next:  multiple notifications ?  
Author Message
Preeda Intanee2

External


Since: Oct 28, 2003
Posts: 4



(Msg. 1) Posted: Tue Oct 28, 2003 6:02 am
Post subject: Schema File for XML data
Archived from groups: microsoft>public>sqlserver>notificationsvcs (more info?)

How to define <Field> in <EventClasses><EventClass><Schema> in
Application Defination file and what is the schema file (.xsd) look
like?

If my event data in XML file as below.

<root>
<NewsID>ABCD</NewsID>
<Transaction>ADD</Transaction>
<VendorTime>20030826T00:00:00</VendorTime>
<UpdateTime>20030826T11:33:08</UpdateTime>
<SourceCode>SWD</SourceCode>
<OriginalCodes>
<OriginalCode>STK</OriginalCode>
</OriginalCodes>
<Headline>asdsdas</Headline>
<Story>asdasdad</Story>
<Languages>
<Language>THAI</Language>
</Languages>
<Symbol>BBL</Symbol>
<Reference>fsdfsdf</Reference>
<Files>
<File>
<Name>zip</Name>
<Content>UEsDBBQAAAAIAAtK0C6R9Ck</Content>
</File>
</Files>
</root>



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 >> Stay informed about: Schema File for XML data 
Back to top
Login to vote
Davide Mauri

External


Since: Nov 02, 2003
Posts: 8



(Msg. 2) Posted: Sun Nov 02, 2003 6:15 pm
Post subject: Re: Schema File for XML data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi

you need to make your own XSD and then reference it in the ADF file in the
Provider / HostedProvider section.

This is a snippet of code taken from the Stock Example:

<Providers>

<HostedProvider>

<ProviderName>StockEP</ProviderName>

<ClassName>FileSystemWatcherProvider</ClassName>

<SystemName>%_NSSystem_%</SystemName>

<Arguments>

<Argument>

<Name>WatchDirectory</Name>

<Value>%_EventsDir_%</Value>

</Argument>

<Argument>

<Name>SchemaFile</Name>

<Value>%_BaseDirectoryPath_%\AppDefinition\EventsSchema.xsd</Value>

</Argument>

<Argument>

<Name>EventClassName</Name>

<Value>StockEvents</Value>

</Argument>

</Arguments>

</HostedProvider>



</Providers>




"Preeda Intanee" <ipreeda DeleteThis @chula.com> wrote in message
news:OIQpIMUnDHA.2652@TK2MSFTNGP09.phx.gbl...
 > How to define <Field> in <EventClasses><EventClass><Schema> in
 > Application Defination file and what is the schema file (.xsd) look
 > like?
 >
 > If my event data in XML file as below.
 >
 > <root>
 > <NewsID>ABCD</NewsID>
 > <Transaction>ADD</Transaction>
 > <VendorTime>20030826T00:00:00</VendorTime>
 > <UpdateTime>20030826T11:33:08</UpdateTime>
 > <SourceCode>SWD</SourceCode>
 > <OriginalCodes>
 > <OriginalCode>STK</OriginalCode>
 > </OriginalCodes>
 > <Headline>asdsdas</Headline>
 > <Story>asdasdad</Story>
 > <Languages>
 > <Language>THAI</Language>
 > </Languages>
 > <Symbol>BBL</Symbol>
 > <Reference>fsdfsdf</Reference>
 > <Files>
 > <File>
 > <Name>zip</Name>
 > <Content>UEsDBBQAAAAIAAtK0C6R9Ck</Content>
 > </File>
 > </Files>
 > </root>
 >
 >
 >
 > *** Sent via Developersdex <a style='text-decoration: underline;' href="http://www.developersdex.com" target="_blank">http://www.developersdex.com</a> ***
 > Don't just participate in USENET...get rewarded for it!<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Schema File for XML data 
Back to top
Login to vote
Preeda Intanee2

External


Since: Oct 28, 2003
Posts: 4



(Msg. 3) Posted: Sun Nov 02, 2003 11:14 pm
Post subject: Re: Schema File for XML data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I already created XSD file and reference in ADF file.
Anyway, the XSD that generated from my XML file have many table. ( you
can try by generate XSD from my actual EventData.xml)
It is not too simple like EventData.xml in Stock application which have
only 2 element for StockSymbol and StockPrice.
My EventData.xml have some node as below
...
...
<files>
<file>
<name>zip</name>
<content>uesdbbqaaaaiaatk0c6r9ck</content>
</file>
</files>
...
...
You will see <name> and <content> that defined inside <files>/<file>.
I don't know how to define node <name> and <content> in ADF (not XSD)
that will generate database table for my application.

It's work if I modify my EventData.xml by remove node
<files>
<file>
</file>
<files>

***************Modified EventData.xml*************
<root>
<NewsID>abcd</NewsID>
  <VendorTime>20030826T</VendorTime>
  <UpdateTime>20030826T</UpdateTime>
  <SourceCode>SWD</SourceCode>
  <OriginalCode>STK</OriginalCode>
  <Headline>sdfsd</Headline>
  <Story>sdfasdf</Story>
<Language>Thai</Language>
<Symbol>BBL</Symbol>
  <Reference>sdfsd</Reference>
  <Name>sfsdf</Name>
<Content>aaaa</Content>
</root>

Then create the XSD file from the modiied EventData.xml.
But my application must support to the actual EventData.xml


The actual EventData.xml must be as below

**************Actual EventData.xml****************
<root>
<newsid>abcd</newsid>
<transaction>add</transaction>
<vendortime>20030826t</vendortime>
<updatetime>20030826t</updatetime>
<sourcecode>swd</sourcecode>
<originalcodes>
<originalcode>stk</originalcode>
</originalcodes>
<headline>asdsdas</headline>
<story>asdasdad</story>
<languages>
<language>thai</language>
</languages>
<symbol>bbl</symbol>
<reference>fsdfsdf</reference>
<files>
<file>
<name>zip</name>
<content>uesdbbqaaaaiaatk0c6r9ck</content>
</file>
</files>
</root>




*** Sent via Developersdex <a style='text-decoration: underline;' href="http://www.developersdex.com" target="_blank">http://www.developersdex.com</a> ***
Don't just participate in USENET...get rewarded for it!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Schema File for XML data 
Back to top
Login to vote
Davide Mauri

External


Since: Nov 02, 2003
Posts: 8



(Msg. 4) Posted: Tue Nov 04, 2003 2:14 am
Post subject: Re: Schema File for XML data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I fear that, as far as I know, you *cannot* define an event class on more
than exactly one table on SQL Server: in fact you cannot have more than one
Schema section under the EventClass element in the ADF files.

This means that if you supply an xsd schema the teoretically allows you the
use more than 1 table, you cannot define the database schema (so tables and
their relation) in the ADF file, so, in other words you cannot pratically
import event data that needs to be stored in more than one table.

What you can try to do, but beware that is a dirty trick, is to modify your
database AFTER the NSControl has created it. Since NS uses the SQL XML Bulk
Load function, they *should* be capable of importing data into more than one
table...so if you change the database on your own the solution may work at
the end....but this is just an hypotetic thesis.....i'll try this solution
as soon as possible since it may be interesting anyway.

Davide

PS
Maybe someone at MS can say if what I suppose will effectively work...Smile

"Preeda Intanee" <ipreeda.TakeThisOut@chula.com> wrote in message
news:uOKdBEcoDHA.3700@TK2MSFTNGP11.phx.gbl...
 > I already created XSD file and reference in ADF file.
 > Anyway, the XSD that generated from my XML file have many table. ( you
 > can try by generate XSD from my actual EventData.xml)
 > It is not too simple like EventData.xml in Stock application which have
 > only 2 element for StockSymbol and StockPrice.
 > My EventData.xml have some node as below
 > ..
 > ..
 > <files>
 > <file>
 > <name>zip</name>
 > <content>uesdbbqaaaaiaatk0c6r9ck</content>
 > </file>
 > </files>
 > ..
 > ..
 > You will see <name> and <content> that defined inside <files>/<file>.
 > I don't know how to define node <name> and <content> in ADF (not XSD)
 > that will generate database table for my application.
 >
 > It's work if I modify my EventData.xml by remove node
 > <files>
 > <file>
 > </file>
 > <files>
 >
 > ***************Modified EventData.xml*************
 > <root>
 > <NewsID>abcd</NewsID>
 > <VendorTime>20030826T</VendorTime>
 > <UpdateTime>20030826T</UpdateTime>
 > <SourceCode>SWD</SourceCode>
 > <OriginalCode>STK</OriginalCode>
 > <Headline>sdfsd</Headline>
 > <Story>sdfasdf</Story>
 > <Language>Thai</Language>
 > <Symbol>BBL</Symbol>
 > <Reference>sdfsd</Reference>
 > <Name>sfsdf</Name>
 > <Content>aaaa</Content>
 > </root>
 >
 > Then create the XSD file from the modiied EventData.xml.
 > But my application must support to the actual EventData.xml
 >
 >
 > The actual EventData.xml must be as below
 >
 > **************Actual EventData.xml****************
 > <root>
 > <newsid>abcd</newsid>
 > <transaction>add</transaction>
 > <vendortime>20030826t</vendortime>
 > <updatetime>20030826t</updatetime>
 > <sourcecode>swd</sourcecode>
 > <originalcodes>
 > <originalcode>stk</originalcode>
 > </originalcodes>
 > <headline>asdsdas</headline>
 > <story>asdasdad</story>
 > <languages>
 > <language>thai</language>
 > </languages>
 > <symbol>bbl</symbol>
 > <reference>fsdfsdf</reference>
 > <files>
 > <file>
 > <name>zip</name>
 > <content>uesdbbqaaaaiaatk0c6r9ck</content>
 > </file>
 > </files>
 > </root>
 >
 >
 >
 >
 > *** Sent via Developersdex <a style='text-decoration: underline;' href="http://www.developersdex.com" target="_blank">http://www.developersdex.com</a> ***
 > Don't just participate in USENET...get rewarded for it!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Schema File for XML data 
Back to top
Login to vote
Preeda Intanee2

External


Since: Oct 28, 2003
Posts: 4



(Msg. 5) Posted: Tue Nov 04, 2003 3:14 am
Post subject: Re: Schema File for XML data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It is a good news for me that you understand my problems.
By the way, in the real world EventData.xml might be similar ito my
case.
I would appreciate if you could solve my problems.
I'm waiting for your solution.
Please keep in touch.

Thanks,
Preeda Intanee



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 >> Stay informed about: Schema File for XML data 
Back to top
Login to vote
Davide Mauri

External


Since: Nov 02, 2003
Posts: 8



(Msg. 6) Posted: Tue Nov 11, 2003 7:58 pm
Post subject: Re: Schema File for XML data [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi

now i cannot try the solution i suggested you since i'm full of work, but i
think you can find a nice help in the SQLXML 3.0 Sp1 Help.

Look for this topic:

Examples of Bulk Loading XML Documents

it tells you how to bulk load xml into multiple tables.

By

Davide

"Preeda Intanee" <ipreeda DeleteThis @chula.com> wrote in message
news:OXscouqoDHA.2416@TK2MSFTNGP10.phx.gbl...
 > It is a good news for me that you understand my problems.
 > By the way, in the real world EventData.xml might be similar ito my
 > case.
 > I would appreciate if you could solve my problems.
 > I'm waiting for your solution.
 > Please keep in touch.
 >
 > Thanks,
 > Preeda Intanee
 >
 >
 >
 > *** Sent via Developersdex <a style='text-decoration: underline;' href="http://www.developersdex.com" target="_blank">http://www.developersdex.com</a> ***
 > Don't just participate in USENET...get rewarded for it!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Schema File for XML data 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
NSRuleFiring_SPID Contains no data - No data in Notificati.. - Hi All, We are facing a problem where no data is inserted into the NotificationClass table from the Subscription Class. Due to this we do not receive data in the email body. We are using a CustomDelieveryProtocol. Everything is working fine but no data....

Is the trace flag (8720) needed? - I'm converting SQL7 to SQL2K. The database scripts have an statement: DBCC TRACEON (8720) It's from third party vendor for previous database build or update. I'd like to know if the trace flag 8720 still is needed for SQL 2K or not. If not, I'm going to....

High-level requirement for a pub-sub app - Thank you, Shyam, for your answer to my question regarding the distributor and delivery protocol objects. Your explanation was very helpful to me. Now I have another question for you and the group. I've been given a rough sketch of a possible futur...

Mapi error - I am trying set up notfication so it emails when jobs fail etcc. I am using sql server 2000 service pack 3A i have set up a mail profile and when I go into enterprise manger and go to test sql mail it says it opens and closes my mapi connection fine.....

How to get notification instance from another machine - Hi I want to run my webapplication at machine1, which should access the notification instance created at machine2. I dont see any server configuration in notificationservices properties. How this can be done? Thanks
   Database Help (Home) -> Notification Services All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]