Hi Sridhar,

A STAX job can parse an XML file using an XML Parser of your choice (many
XML Parsers are freely available -- just google).  You can using
Jython/Java to parse an xml file via a <script> element within a STAX job,
or you could use any programming language you want to parse a xml file and
run your program via a <process> element within a STAX job.  So, this
question is not really a STAF or STAX question, but an XML parsing question
(which is best answered elsewhere).

The STAF/STAX FAQ provides an example of how you can use the XML Parser
provided with Java to parse an XML file via a <script> element within a
STAX job.  See entry "2.6.7 How can I parse an XML file from a STAX job?"
in the STAF/STAX FAQ at
http://staf.sourceforge.net/current/STAFFAQ.htm#d0e736 for more
information.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   "Sridhar, Moningi" <moningi.srid...@patni.com>
To:     Sharon Lucas/Austin/i...@ibmus
Date:   09/14/2010 02:30 AM
Subject:        Re: [staf-users] Parsing a XML file in a stax job.



Hi Lucas,

Hope doing good. I am Sridhar.

I am having some doubts on XML parsing. I hope you can guide me through my
doubts.

I am having on .xml file as below named xyz.xml

<SqlQueries>
      <query id="EVO001.1">
            SELECT * FROM table1
      </query>
      <query id="EVO001.2">
            SELECT * FROM table2
      </query>
</SqlQueries>

I imported this xml file in another xml file named abc.xml as follows:

<import resource=”/xyz.xml”/>
<sql-config>

</sql-config>


I want to parse the 2nd xml i.e. abc.xml using dom, and pass those values
(Id and query) in MAP collection
 Please guide me to do this.


Thanking You.

Regards,
Sridhar Moningi.





Information contained and transmitted by this e-mail is confidential and
proprietary to Patni Computer Systems Ltd and its affiliates (hitherto
referred as Patni Computers) and is intended for use only by the recipient.
If you are not the intended recipient , you are hereby notified that any
dissemination, distribution, copying or use of this e-mail is strictly
prohibited and you are requested to delete this e-mail immediately and
notify the originator or netad...@patni.com. Patni Computers does not enter
into any agreement with any party by e-mail. Any views expressed by an
individual do not necessarily reflect the view of Patni Computers. Patni
Computers is not responsible for the consequences of any actions taken on
the basis of information provided, through this email. The contents of an
attachment to this e-mail may contain software viruses, which could damage
your own computer system. While Patni Computers has taken every reasonable
precaution to minimise this risk, we cannot accept liability for any damage
which you sustain as a result of software viruses. You should carry out
your own virus checks before opening an attachment. To know more about
Patni Computers please visit www.patni.com.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to