Skip to Content
0

How to pass values seperately in Java Mapping in SAX Parser

Feb 27, 2017 at 05:10 AM

48

avatar image
Former Member

We have File to Proxy scenario in which we have used Java mapping(SAX parser) to check file contents and validate the values. we are reading file details like Header(rootnode) field and reading fields which are under Header node, reading root field trailer as well as reading fields which are under trailer
I need to pass extra fields with values after trailer field as shown below in SAX Parser. Please help me and let me know how can i pass these extra fields along with values in SAP parser.

Here <Record> is root node and <Flag> & <desc> are fields inside rootnode.
<Record>
<Flag>Y<Flag>
<desc>Error<desc>
</Record>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Evgeniy Kolmakov Feb 27, 2017 at 07:00 AM
0

Hi Nikhilesh!

So what exactly is your problem? I haven't used SAX parser for quite a long time but as far as I remember, you have startElement and endElement methods where you can place the code to build output structure according to your requirements.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 27, 2017 at 10:08 AM
0

Hi Nikhilesh!

If you have to use SAX parser then XMLFilter could be a solution.

Regards,

Andrzej

Share
10 |10000 characters needed characters left characters exceeded