on 09-25-2008 4:23 PM
Hi
I want to caliculate no of elements present under the parent element using UDF.
Example
<Employee>
-
</Name>
-
</No>
-
</Address>
-
</City>
So it has 4 elements undre Main tag Emoloyee.
How to caliculate the no of elements under parent element using UDF.
I want to use this for error handling. Whenever the message in coming in I want to caliculate the no of fields if i get the no of fields is lessthank 4 i want to throw an error.
And could any one please provide the JAVA API for mapping
Thanks & Regards
Sowmya.
Hi,
Create the UDF of type Queue and give Employee as input
if(employee.length() < 4)
{
throw .......... exception.
}
This link may be useful to you
http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
u can check "exists" node function for all the four elements. If anyone of that is absent throw the error.
regards
rajeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use java UDF... pass the four values in to the UDF and check
simple if for length with a counter shd work...
if (name.length>0 && No.lenght>0 &&....)
counter==4;
else
counter==0;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.