Thanks. And how about ServingXML spitting DOM instead of XML?
On Sun, Apr 1, 2007 at 12:01 AM, Daniel Parker wrote:
> You can use a separate RecordBuilder to build each group as its own
> record (RecordBuilders can be reused if you call the clear method
> before building a new record.) Then create an array with the records
> as entries, and set a field with a name and the array of group records
> (segments), i.e.
>
> RecordBuilder mainRecordBuilder = new
> RecordBuilder(recordTypeName);
> Name myRepeatingGroup = new QualifiedName("myRepeatingGroup");
> Record[] segments;
>
> mainRecordBuilder.setField(myRepeatingGroup, segments);
> ... other assignments ...
> Record record = recordBuilder.toRecord();
>
> If you need to access the segments in Java code, from the record, you
> can do so as follows:
>
> Value value = record.getValue(myRepeatingGroup);
> Record[] segments = value.getSegments();
>
> Also, refer to the javadoc for RecordBuilder, Record, and Value.
>
> -- Daniel
>
> ----- Original Message ----- From: "Sandhya" <sa...@la...>
> To: <dan...@sy...>
> Sent: Saturday, March 31, 2007 5:24 PM
> Subject: RecordBuilder
>
>
>> Daniel
>>
>> How can I create a new record using RecordBuilder for the following
>> type
>> of record. It has repeatingGroups.
>>
>> NAME1=VALUE1|NAME2=VALUE2|NAME2=VALUE3
>>
>>
>> On a separate note, can servingxml spit out DOM nodes in memory
>> instead
>> of XML to an output stream. I want to pass these DOM nodes to another
>> business component as input.
>>
>> Regards
>> Sandhya
>>
>
>
--
Sent using Laszlo Mail. Try it yourself.
http://www.laszlomail.com
|