on 03-09-2007 1:37 PM
1. How to count the record in Java mapping.
2. Can you provide some java mapping samples.
Ravi
Hi,
This will help you
/people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
There are three XML parsing techniques which can be used in Java Mapping.
1. Document Object Model (DOM): This type of parsing technique parses the XML by storing the XML in memory.
http://www.w3schools.com/dom/dom_examples.asp for examples related to DOM parsing..
2. Simple API for XML (SAX): This type of parsing technique parses the XML sequentially. It is quite faster than DOM.
http://www.javaworld.com/javaworld/jw-05-2002/jw-0517-sax.html
http://www.bearcave.com/software/java/xml/sax_parsing.html
Examples for SAX parsing
You can use a counter while parsing to count the number of records in XML for both SAX and DOM.
These two parsing techniques are supported by XI for Java 1.4.2_X.
3. Stream API for XML (STaX): This type of parsing technique is similar to SAX but it can work with multiple XSD's and is also a pull based model.
This technique is supported by XI for Java EE 5.
http://dev2dev.bea.com/pub/a/2004/01/pullparsing.html
The java mapping examples are
/people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
Hope this helps
Regards
Kiran..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
if you want to count record by creating a UDF in JAVA, then in graphical mapping take source node (which you have to count) , change its context to the topmost node, then in UDF write below statement:
int len = a.length;
return Integer.toString(len);
The output of this UDF gives rec count.......then use this rec count data in whatever way you want.....
Thanks,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Java Mappings
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
Regards
Sreeram.G.reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.