Back to Four Js Website
Four Js Customer Forum
Subscribe for automatic updates:
RSS
Sign in for full access
|
Help
Four Js Development Tools Forum
>
Discussions by product
>
Genero BDL
>
change from om to xml library
Most recent posts
Pages: [
1
]
« previous
next »
Reply
|
Print
Author
Topic: change from om to xml library (Read 9881 times)
Paul S.
Posts: 45
change from om to xml library
«
on:
September 10, 2011, 08:29:13 pm »
With the om version of a DomNode , you could use TypeInfo and domnode.writexml to create a qucik XML dump. This
worked great for array's as well. see code below
I want to repeat this feature using the xml.domnode and xmlDomDocument, I have tried a number of ways using
xml.Serializer.Variableto dom . but cannot get it to work, any ideas?
Thanks
Paul
01 MAIN
02 DEFINE n om.DomNode
03 DEFINE r RECORD
04 key INTEGER,
05 lastname CHAR(20),
06 birthdate DATE
07 END RECORD
08 LET r.key = 234
09 LET r.lastname = "Johnson"
10 LET r.birthdate = MDY(12,24,1962)
11 LET n = base.TypeInfo.create( r )
12 CALL n.writeXml( "r.xml" )
13 END MAIN
Frank G.
Posts: 48
Re: change from om to xml library
«
Reply #1 on:
September 12, 2011, 09:40:42 am »
Hi,
The xml serializer will serialize any 4GL variable as child node of a given dom node. This implies that you must first create a child node where to attach the resulting conversion. If you don't need a real dom node, you can create a document fragment node, and then append it where you want in the XML tree.
See attached sample. Notice also that you can set attributes to change the default way to serialize the 4GL record.
doc.xml
(0.17 KB - downloaded 956 times.)
Paul S.
Posts: 45
Re: change from om to xml library
«
Reply #2 on:
September 12, 2011, 09:48:27 am »
Thanks , I will have a look.
Paul
Frank G.
Posts: 48
Re: change from om to xml library
«
Reply #3 on:
September 12, 2011, 11:04:42 am »
Sorry, I attached the wrong file. Here the good one :)
xml.4gl
(0.84 KB - downloaded 931 times.)
Paul S.
Posts: 45
Re: change from om to xml library
«
Reply #4 on:
September 12, 2011, 11:26:37 am »
Thanks Again.
Paul
Pages: [
1
]
Reply
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> Ask Reuben
=> WWDC21
-----------------------------
Discussions by product
-----------------------------
=> Products announcements
=> Genero BDL
=> GWS
=> GAS and GBC
=> GDC
=> Genero Mobile for Android or iOS
=> Genero Studio
=> Reporting tools (GRW, GRE)
-----------------------------
Jobs
-----------------------------
=> Jobs
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Loading...