cancel
Showing results for 
Search instead for 
Did you mean: 

Processing SGML file in XI / PI possible?

Former Member
0 Kudos

Hello all,

we want to process an SGML file through XI / PI. The problem is that the SGML has tags in that are not closed like this:

<aaa attribute="..."...> ... </aaa>

<bbb attribute="...">

<ccc attribute="..."...> ... </ccc>

my first idea was to read this with fileadapter and create a file adapter module in front of processing but i am not really sure that his is working. the own fileadapter module should be able to enhance the SGML with the closing tags. I do not know the algorithm at the moment i have to use...

Are there any other solutions for my problem?

many thanks

alex

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Alex

You can process SGML but you need adapter module.

As SGML need not to be strict XML file. You can face tags that does not have end tag or no attribute.

To convert SGML to XML best is to use a DTD to compare with while generating XML due to irregular tags.

Download some free tool which convert SGML to XML and try to generate DTD as well. Write adapter module for the same and then verify against the tool

Thanks

Gaurav

Former Member
0 Kudos

HI VJ,

i am not sure that this solve my problem. i have a problem with the missing tag for bbb, not for aaa. or am i wrong?

many thanks

alex

Former Member
0 Kudos

I think you can't process this a ordinalry file as XML needs closing tag mandatory or else self ended Tags,

You can write a module to read file accordingly.

Thanks

Prabhakar

VijayKonam
Active Contributor
0 Kudos

Oops.. I missed bbb..!! I think you should write an adapter module.

VJ

VijayKonam
Active Contributor
0 Kudos

That is a normal XML strucuture. In your data type create attribute for the aaa element instead of elements under it. You are done.

VJ