Author |
Message
|
soudhanya |
Posted: Tue Nov 28, 2017 8:31 am Post subject: Parsing DFDL in Java |
|
|
Novice
Joined: 27 Feb 2017 Posts: 20
|
Hi,
Can somebody help me how to write below code in java
CREATE LASTCHILD OF Environment.NonIntervalUsageRecords DOMAIN('DFDL') PARSE(inputXml, 546, 1208, '','{http://www.ibm.com/dfdl/RecordSeparatedFieldFormat}:NonIntervalUsageRecords','' , 0);
Thanks.. |
|
Back to top |
|
|
Vitor |
Posted: Tue Nov 28, 2017 8:40 am Post subject: |
|
|
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
As to Java, I'm the worst person in the world to advise you.
I'm slightly alarmed to see something called "inputXml" being parsed with DFDL. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
|
soudhanya |
Posted: Tue Nov 28, 2017 8:53 am Post subject: |
|
|
Novice
Joined: 27 Feb 2017 Posts: 20
|
DECLARE inputXml CHARACTER CAST(InputRoot.BLOB.BLOB AS CHAR CCSID 1208);
inputxml is the blob message |
|
Back to top |
|
|
timber |
Posted: Tue Nov 28, 2017 4:07 pm Post subject: |
|
|
Grand Master
Joined: 25 Aug 2015 Posts: 1290
|
Why are you trying to parse XML with the DFDL parser? |
|
Back to top |
|
|
Vitor |
Posted: Wed Nov 29, 2017 6:27 am Post subject: |
|
|
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
timber wrote: |
Why are you trying to parse XML with the DFDL parser? |
Vitor wrote: |
I'm slightly alarmed to see something called "inputXml" being parsed with DFDL. |
I don't think you're going to get much from us until you explain this apparently inexplicable decision. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
|
rekarm01 |
Posted: Wed Nov 29, 2017 6:20 pm Post subject: Re: Parsing DFDL in Java |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
soudhanya wrote: |
Can somebody help me how to write below code in java
Code: |
CREATE LASTCHILD OF Environment.NonIntervalUsageRecords DOMAIN('DFDL') PARSE(inputXml, 546, 1208, '','{http://www.ibm.com/dfdl/RecordSeparatedFieldFormat}:NonIntervalUsageRecords','' , 0); |
|
The Java user-defined node API describes a method that, for a given element, will create another element as its last child from a bitstream.
soudhanya wrote: |
Code: |
DECLARE inputXml CHARACTER CAST(InputRoot.BLOB.BLOB AS CHAR CCSID 1208); |
|
Setting aside the question of why a variable called "inputXml" would contain a presumably non-XML message, why would the message flow CAST a perfectly good BLOB to CHARACTER before passing it to the PARSE clause of a CREATE statement? |
|
Back to top |
|
|
fjb_saper |
Posted: Thu Nov 30, 2017 5:40 am Post subject: Re: Parsing DFDL in Java |
|
|
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20729 Location: LI,NY
|
rekarm01 wrote: |
Setting aside the question of why a variable called "inputXml" would contain a presumably non-XML message, why would the message flow CAST a perfectly good BLOB to CHARACTER before passing it to the PARSE clause of a CREATE statement? |
My guess is to make it readable by a human when running in debug mode... _________________ MQ & Broker admin |
|
Back to top |
|
|
|