Baby question about creating XML documents

  • Thread starter Thread starter Heinz Kiosk
  • Start date Start date
H

Heinz Kiosk

I'd like to implement the IHasXmlNode interface in a class heirarchy. I
can't see how you do this as all of the classes that I'd use to build the
XML and return it seem to be locked down for Framework Use Only. Presumably
I'm missing something.

I could just ignore IHasXmlNode and build text strings perfectly easily but
I wanted to do it the "right" way.

Can anyone supply a tiny code fragment of how you'd implement GetNode to
return a single element with its text and maybe another example with how you
would handle the case where GetNode builds an element but then calls another
classes GetNode to populate it with further elements/text in a typical XML
heirarchy.

Thanks

Tom
 
Heinz said:
I'd like to implement the IHasXmlNode interface in a class heirarchy. I
can't see how you do this as all of the classes that I'd use to build the
XML and return it seem to be locked down for Framework Use Only. Presumably
I'm missing something.

IHasXmlNode interface has the only GetNode() method, which returns
XmlNode. Nothing internal to .NET Framework. To build XML in this case
you can use XmlDocument class.
 
Back
Top