Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: DOORS Script and XML
Topic Summary:
Created On: 25-May-2004 16:04
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 25-May-2004 16:04
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

A project I am working for would like to use XML to extract information from a common database repository. Has anybody written DXL scripts to generate a XML document from DOORS data, and could they post some basic code? I would like to prove the concept to the project group.
With appreciation.

Report this to a Moderator Report this to a Moderator
 3-Sep-2004 21:29
User is offline View Users Profile Print this message


Ewen Miller

Posts: 99
Joined: 20-Nov-2002

Hi.


I'm told DocExpress v3.3 allows you to export data extracted from DOORS 7.x as XML - not done it myself.


Hope this is useful.

EWen Miller
Report this to a Moderator Report this to a Moderator
 6-Sep-2004 09:17
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

XML is the de-facto standard for data exchange and allows tremendous flexibility in data handling, document production, configuration management etc. Lets hope that your project guys see the light and get using it.

Telelogic have an XML importer/exporter, but they won't give it away for nothing!
See thread http://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=610&highlight_key=y&keyword1=xml

On the same thread, Marc Battistello has posted a simple example of how to export XML.

We too have developed an XML importer/exporter a part of a larger product, but again I am afraid it is too valuable to post here.

What I can tell you though is that writing a DOORS XML Exporter is relatively straight-forward, compared to other tools,
because the data is already structured in a hierarchy suitable for XML.

Best of luck!





-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 7-Sep-2004 07:57
User is offline View Users Profile Print this message


Lenka Koskova-Triskova

Posts: 10
Joined: 17-Dec-2003

Hi,
just now I am solving the same problem; I would like to generate the reports etc. using XML/XSLT.
(My motivation is clear: why to use this undocummented DXL when I can use my cherished XSLT to process my data?)
I don't see as the biggest problem the DXL export script - it can be done quite easily.
Let's create a very simple XML output structure:

<object><title>First Object Title</title>
<object><title>First Child Title</title>
First Child Text
</object>
</object>
...

To get this, you just need to call following function with your first module object as an input parameter:

void insertXMLTree(Object objNode, Stream XMLFile, int IterNo) {
//Reads the document tree structure and exports it into ReQML XML document
//Only object heading + text are exported...
if (objNode != null) {
string Heading = objNode."Object Heading"
string Text = objNode."Object Text"

XMLFile << "<object><title>" Heading "</title>\n"
XMLFile << Text "\n"

Object childNode = first(objNode)

while (childNode != null) {
insertXMLTree(childNode, XMLFile, IterNo+1)
childNode = next(sibling(childNode))
}

XMLFile << "</object>"

// and now process the sibling objects of the first one in the document:
if (IterNo == 1) {
Object nextNode = next(sibling(objNode))
while (nextNode != null) {
insertXMLTree(nextNode, XMLFile, IterNo+1)
nextNode = next(sibling(nextNode))
}
}
}
}

Stream XMLFile = write "test.xml"

Module sourceModule = current
Object startObject = first sourceModule
insertXMLTree(startObject, XMLFile, 0)

So... well I hope it will work, I have cut a lot of lines from my original code, to have really simple example :-)
Have a lot of fun.
Finally, I would like to say that to design a propriate XML Schema for your outputs is a bigger challenge that to write this simple script :-)

Lenka Koskova-Triskova
-------------------------------
Skoda Auto, multimedia and car radio development
ext.lenka.koskova-triskova@skoda-auto.cz
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.