Parsing xml

A Blanchard infomni at
Mon Nov 12 14:04:15 EST 2018

 Hi Michael
That's a good idea
I Will test it
    Le lundi 12 novembre 2018 à 19:31:00 UTC+1, Michael Mantkowski <michaelj at> a écrit :  
 #yiv4370623515 #yiv4370623515 -- _filtered #yiv4370623515 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv4370623515 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv4370623515 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv4370623515 #yiv4370623515 p.yiv4370623515MsoNormal, #yiv4370623515 li.yiv4370623515MsoNormal, #yiv4370623515 div.yiv4370623515MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv4370623515 a:link, #yiv4370623515 span.yiv4370623515MsoHyperlink {color:blue;text-decoration:underline;}#yiv4370623515 a:visited, #yiv4370623515 span.yiv4370623515MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv4370623515 p.yiv4370623515msonormal0, #yiv4370623515 li.yiv4370623515msonormal0, #yiv4370623515 div.yiv4370623515msonormal0 {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv4370623515 span.yiv4370623515EmailStyle19 {font-family:sans-serif;}#yiv4370623515 .yiv4370623515MsoChpDefault {font-size:10.0pt;} _filtered #yiv4370623515 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv4370623515 div.yiv4370623515WordSection1 {}#yiv4370623515 
Hi Arnaud,


Sorry, I do not have documentation on “oxml” and I have never used it.


For more complex issues I store a copy of the XML as a template and add replaceable fields to it for adding data.  In the example below, I replace the field in square brackets with my data and then add the services I am ordering the “Insert Test Here” section that is created in a loop in my application.  This specific example creates an order for lab tests for a out side laboratory service.




<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE message SYSTEM "work_request_20.dtd">

<message message_id="[MessageID]" message_dt="[MessageDateTime]" message_type="Work_Request" message_sub_type="[MessageType]" message_dtd_version_number="2.0">






                                <work_request requisition_number="[LogRsn]">

                                                <client client_id="[AccountNo]">




                                                <patient patient_id="[PetRSN]" patient_species="[PetSP]" patient_gender="[PetGN]">




                                                                  <patient_weight patient_weight_uom="[PetWeightType]">








                                                <!-- There will be one or more services. -->


<!-- Insert Tests Here -->







Michael Mantkowski

ClienTrax Software




From: A Blanchard <infomni at> 
Sent: Monday, November 12, 2018 12:14 PM
To: 'OmnisDev List - English' <omnisdev-en at>; Michael Mantkowski <michaelj at>
Subject: Re: Parsing xml


Hello Michael


Thanks for your help.


I think this method is suitable for simple files with a single level of tag.

My files are more complicated with multiple levels.

I heard about oxml but I can not find any documentation.

Have you got some ?


Thank you



Le lundi 12 novembre 2018 à 17:11:40 UTC+1, Michael Mantkowski <michaelj at> a écrit : 



Hi Arnaud,

I am sure there are several ways to go about creating an XML file based on
the complexity of what you need.  Below is a very simple method I have to
create a list of Inventory Items for a 3rd party service that our clients
can subscribe to.

Whenever I need to support a vendor's requirements I have them send me a
template XML file of what they need then break it done into the most
efficient way to recreate it substituting our data where needed.  In this
case I needed to account for special characters that could appear in the
inventory items descriptions and escape them out before sending the XML.

Hope that helps.


;  Make Products XML Text

;  Get Inventory List
Begin reversible block
    Set current list lvInventoryList
    Set main file {INVENT}
End reversible block
Define list {INV_RSN,ITEM_NO,INV_DESC,InvMfgBarCode}
Set search as calculation {(InvDiagItem=0)&(InvSrvInv=1)}
Build list from file on ITEM_NO (Use search)

Calculate lvProducts as ''
;  Add Header
Calculate lvDateTime as con(jst(#D,'D:y-M-D'),' ',jst(#D,'T:H:N:S'))
Do method ----getNewGUID Returns lvGUID
Calculate lvProducts as con(lvProducts,'<?xml version="1.0"
Calculate lvProducts as con(lvProducts,'<syncclinicproducts
syncdate="',lvDateTime,'" syncguid="',lvGUID,'"
Calculate lvProducts as con(lvProducts,'  <clinic
clinicguid="5408d8d5-864b-4560-8b61-b62cd263a530" clinicname="',P_NAME,'"
Calculate lvProducts as con(lvProducts,'  <products>',kCr)
For each line in list from 1 to #LN step 1
    Load from list
    ;  Add Line Items
    Calculate INV_DESC as replaceall(INV_DESC,'&','&')
    Calculate INV_DESC as replaceall(INV_DESC,'<','<')
    Calculate INV_DESC as replaceall(INV_DESC,'>','>')
    Calculate INV_DESC as replaceall(INV_DESC,"'",''')
    Calculate INV_DESC as replaceall(INV_DESC,'"','"')
    Calculate lvProducts as con(lvProducts,'              <product
name="',INV_DESC,'" barcode="',InvMfgBarCode,'" id="',INV_RSN,'"
displayid="',ITEM_NO,'" hospitalid=""',' />',kCr)
End For
;  Add Footer
Calculate lvProducts as con(lvProducts,'  </products>',kCr)
Calculate lvProducts as con(lvProducts,'</syncclinicproducts>',kCr)

Quit method lvProducts

Michael Mantkowski
ClienTrax Software

-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at> On Behalf Of A
Blanchard via omnisdev-en
Sent: Monday, November 12, 2018 11:00 AM
To: Omnisliste <omnisdev-en at>
Cc: A Blanchard <infomni at>
Subject: Parsing xml

I need to generat xml file for a customer using OS$8.0.3 Is it possible to
have an example ?
Thank you very much ?
Arnaud Blanchard

Manage your list subscriptions at Start a new
message -> mailto:omnisdev-en at


More information about the omnisdev-en mailing list