Author Topic: Viewing XML output in CMOD ?  (Read 2922 times)

LWagner

  • Guest
Viewing XML output in CMOD ?
« on: February 07, 2011, 10:52:28 AM »
Is there such a thing as an XML viewer for CMOD ?

A new variation request of our re-designed bill images is to save them within CMOD as XML.  I've been sent two files, named XML_Composed.xml and XML_Content.xml, and a pdf of what they should look like when displayed.

If some other system wants them as XML, but retrieve them from CMOD, this might work.  But indexing and resources become an issue. I tried opening each in a browser.  One gave me a missing resource error, the other just display of XML code.

Any ideas for direction to advance ?

Thank You,


Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Viewing XML output in CMOD ?
« Reply #1 on: February 08, 2011, 12:11:14 AM »
Hello,

Unfortunately with a standard CMOD installation you simply cannot.

I will split your question in 2 parts:

Code: [Select]
How do you index a XML file?
You need to write an XML parser, which will read the XML and create a generic index, which is suitable for CMOD.

Code: [Select]
How do you display a XML file with CMOD?
You cannot, It will display the XML code and nothing else if you say it is from data type "Line Data".
If you choose data type "User Defined", then you will be able on the client side to define a MIME Type which will be able to open the XML and interpret it correctly. But it means that you have such third party program.

Now, if you have from what I've understood with your question 2 XMLs that needs to be read in order to display correctly your document... then you are out of luck.
Because in that case, you need to write a complete set of software and interface it with CMOD with the CMOD APIs ODWEK.
Meaning, that you need to have kind of uniq key for every pair of XML, and when you retrieve the first document, you need to search for the second which have the same uniq key.
Then when you have retrived each document, then you program can either display it, or call the third party viewer in order to display your document.

Or even better, you could zip the files and all the needed resources (like gif, jpeg, png, ...) and save it in CMOD in a data type user defined (like .myzip), and create a special MIME type .myzip to use a 3rd party program which will be called by CMOD and this 3rd party program will open the zip, and display the content...


Well, I don't know if I've answered your question, but one thing is sure, XML is not a special handled format for CMOD. Especially if you need several files to display correctly your document.

Hope this helps,
Cheers,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML