xml - Convert all IXmlNode ChildNodes into a string at once -


i'm parsing xml ixmlnode components going through childnodes code lchildnode := lcalendarnode.childnodes.findnode(cnodeitemid), using nextsibling etcetera.

there part of xml want store in entirety in string, e.g. for

<requiredattendees>   <attendee>     <mailbox>       <emailaddress>user1@localhost.com</emailaddress>     </mailbox>   </attendee>   <attendee>     <mailbox>       <emailaddress>user2@localhost.com</emailaddress>     </mailbox>   </attendee> </requiredattendees> 

i want this in string (with or without line separators/spaces, don't care):

<attendee><mailbox><emailaddress>user1@localhost.com</emailaddress></mailbox></attendee><attendee><mailbox><emailaddress>user2@localhost.com</emailaddress></mailbox></attendee> 

is there way without having parse underlying nodes?
structures , depth may vary, i.e. in example <mailbox> can have different forms.

note no name spaces involved @ (neither attributes @ stage, since xml comes external source, can't bet on staying so).

i (the op) overlooked ixmlnode xml property (thanks llama)

once have var lnode:ixmlnode pointing node , lnode.xml returns string <requiredattendees> <\requiredattendees>. can strip outer xml elements.


Comments