Skip to Content
avatar image
Former Member

How to pass values seperately in Java Mapping in SAX Parser

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>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 27, 2017 at 07:00 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 27, 2017 at 10:08 AM

    Hi Nikhilesh!

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

    Regards,

    Andrzej

    Add comment
    10|10000 characters needed characters exceeded