[xsde-users] Processing variable length root elements as part of message parsing / serializing

O'Laughlin, Terry Terry.O'Laughlin at ipc.com
Mon Nov 22 22:45:59 EST 2010


Hi,

I'm just getting into using XSD/e, see that using variable length root elements discourage the use of the operator = and the copy constructor because of memory allocation.

I'm adapting the 'multiroot' example as we are using XML as the basis for messaging in a communications protocol.
Works great with fixed-length messages.  What do I need to do to adapt it to using variable length root elements?

So when I parse, having received a message from the receiver, we won't know the message type until its parsed during runtime.
I was trying to define a simple 'getter' for a dynamic root element, unfortunately trying to use the 'operator ='.

I know have read and understood why this function and the copy constructor are private.

I see things about 'clones' and detached functions but don't really understand them, an example would be helpful.

So I've now read more and will try more tomorrow....

Generate-clone and detach function
Are these used to 'get' and 'set' the object model?  I just need to use the iterator generated with the class.

Can someone show me an example of how this is supposed to work.

Cheers,

Terry O'



Terry O'Laughlin
Sr. Software Engineer
IPC
TS Engineering Alliance Sustaining Dept.
777 Commerce Drive
Fairfield, CT 06825
phone: 203-339-7987
fax: 203-339-7809
www.ipc.com<http://www.ipc.com/>
Terry.O'Laughlin at ipc.com<mailto:first.last at ipc.com>



________________________________
DISCLAIMER: This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail.E-mail messages may contain computer viruses or other defects, may not be accurately replicated on other systems, or may be intercepted, deleted or interfered with without the knowledge of the sender or the intended recipient. If you are not comfortable with the risks associated with e-mail messages, you may decide not to use e-mail to communicate with IPC. IPC reserves the right, to the extent and under circumstances permitted by applicable law, to retain, monitor and intercept e-mail messages to and from its systems.

[cid:green-logo5079.jpg]Please consider the environment before printing this email.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: green-logo5079.jpg
Type: image/jpeg
Size: 1268 bytes
Desc: green-logo5079.jpg
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20101122/2ab75c98/green-logo5079.jpg


More information about the xsde-users mailing list