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: XML Import
Topic Summary: Dealing with embedded html
Created On: 28-Jan-2008 12:48
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.
 28-Jan-2008 12:48
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Has anyone developed a process to import xml into DOORS when html exists embedded within the xml attributes.

In a hurry, I brute forced the import but in the future I would like to have a refined process to make a reasonable presentation of the html while still importing the xml into respective attributes.

I know xslt can remove the html tags but the removal of tags will loose information such as image source, lists, carriage returns and table formatting. Excel treats the html tags as xml tags and distorts the information.

Attached is a example of the xml/html, I am talking about.

Has anyone developed a process to deal with the embedded html? If so what was your approach.
Report this to a Moderator Report this to a Moderator
 28-Jan-2008 15:11
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Ron, don't tell me you are manually parsing the XML?
I tried that years ago and the complexity of the parser grew and grew as I discovered more and more permutations.

I now use XML all the time for data transfer.
To export to XML I make use of COM OLE and Microsoft's MSXML library. This approach means that all the escaping of special charaters is done for you and you don't need to worry about it.

I quickly learnt, however that using MSXML for importing from XML is not quite so easy. The main issue was that the whole XML document had to be loaded into memory before being parsed. This was incredibly slow.

So I turned to the undocumented DXL perms that allow you to create and read a DOM document. This has proved reliable an efficient method for data transfer.

Unforunately, I am not at liberty to share this stuff, but for an experienced DXL programmer, once you get a grip on the available perms, crunching the data is pretty straight forward.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 29-Jan-2008 08:49
User is offline View Users Profile Print this message


Frank Jensen

Posts: 24
Joined: 18-Sep-2007

Tony,

thank you very very much for pointing on those functions. I was not aware of these.

I just tried them and they work like charm, at least with the 'standard' DOORS schemata. Have you done any investigations regarding others schemas?

Cheers,
Frank

-------------------------
Frank Jensen
TRW Automotive
frank.jensenREMOVE_ME@trw.com
Report this to a Moderator Report this to a Moderator
 29-Jan-2008 09:37
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Not sure if this answers your question, but we have our own XML schema that we use for data transfer, and we have our own doors data model that we use to control linking and tracing. Neither of these can be used with doors out-of-the-box and require our customisations to work.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 30-Jan-2008 12:41
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Tony, thanks for the input. When I get time I will explore that avenue.

In the mean time, I have scraped together a xslt script that lets MS word read in the xml and format the contents as a specification, which I can export to DOORS with no DXL required.

Thanks

Ron Lewis
Report this to a Moderator Report this to a Moderator
 30-Jan-2008 12:44
User is offline View Users Profile Print this message


Frank Jensen

Posts: 24
Joined: 18-Sep-2007

Not sure, too ;-)

What I'd like to know is: can I process xml files with the help of the parseXML... functions, if the xml schema differs from the schema used by getXML for example?

I did a little test but it failed. That's why I think I have to stick with the schema provided by DOORS when I do importing/ exporting from DOORS. The conversion to different schemas has to be done afterwards with a different tool.


Cheers,
Frank

-------------------------
Frank Jensen
TRW Automotive
frank.jensenREMOVE_ME@trw.com
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.