Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Anyone can help with adding data to TextML server?

Reply
Thread Tools

Anyone can help with adding data to TextML server?

 
 
arachno
Guest
Posts: n/a
 
      07-11-2003
Hello ppl,

Is anyone can help me to figure out how to add data to TextML server
document base?
I have attached snipped, which taking XML source from file and adding it to
documentbase, but my problem is, that i need to add it on "fly", without
touching file system.

Cheers,
arachno

------[Code Snippet] ---------------------

'TEXTML Server Document Types
Const TEXTML_DOCUMENT = 1
Const TEXTML_SYSTEM_DOCUMENT = 2

'TEXTML Server SetDocuments AddFlags
Const TEXTML_ADD_DOCUMENT = 1
Const TEXTML_REPLACE_DOCUMENT = 2
Const TEXTML_INDEX_DOCUMENT = 4

Sub Main
On Error Resume Next
Debug.Clear
Dim ClientSrv
Dim ServerSrv
Dim DocBaseSrv
Dim DocumentSrv
Dim DocList
Dim FileSys
Dim xmlFolder
Dim PersistFile As New PersistFile
Dim Files
Dim Document

'Connect to server
Set ClientSrv = CreateObject("TextmlServer.ClientServices")
Set ServerSrv = ClientSrv.ConnectServer("arachno")

'Connect to Document Base
Set DocBaseSrv = ServerSrv.ConnectDocBase ("demo")

'Get the document services of the Document Base
Set DocumentSrv = DocBaseSrv.DocumentServices

'Create a list object that will contain the list of documents to add
Set DocList = CreateObject("IxiaComponents.DynamicList")

'Process the files in the folder
Set PersistFile = CreateObject("IXIAComponents.PersistFile")
PersistFile.LoadFromFile "C:\garbage\demos\acc.xml"
Debug.Print PersistFile.Content
Set Document = CreateObject("TextmlServer.Document")
Document.AttachContent PersistFile.DetachContent
Document.Name = "acc.xml"
Document.MimeType = "text/xml"
DocList.Add Document


'Set documents
DocumentSrv.SetDocuments DocList, TEXTML_ADD_DOCUMENT +
TEXTML_INDEX_DOCUMENT, TEXTML_DOCUMENT
Debug.Print "Documents added"

ErrHandler:
Debug.Print Err.Description
'...handler here...
End Sub


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone Know Anyone at Maas Rowe I can talk to channing28270@gmail.com Computer Support 3 07-05-2006 08:27 AM
Anyone who posts for Help in Here needs Intellix - Anyone providing Help Applicable Also Ditto21 Computer Support 8 02-18-2006 04:27 AM
Adding external data into database data before it is sent to Control(Repeater, Datagrid, etc.) Neo Geshel ASP .Net 2 11-17-2005 12:53 AM
Adding Data To Data Base Paul Smith ASP .Net 4 08-29-2005 11:01 PM
ReQ; Help having problem with cisco router 1602R the Lan part works cannot log on to configure so PC can access internet, router connects to T1 line thier is an alarm light on anyone can help smokin@aol.com Computer Support 4 10-30-2004 06:06 AM



Advertisments