I want to make my XML as such:
<parentItem>
<childItem attribute="myAt tribute">myCont ent</childItem>
</parentItem>
I thought I could just do this:
objXMLWriter.Wr iteElementStrin g("childItem" , "myContent" )
objXMLWriter.Wr iteAttributeStr ing("attribute" , "myAttribut e")
But...I get an error. And I found this that explains why:
http://weblogs.asp.net/sonukapoor/pages/204572.aspx
However, it only explains why it happens, not how to actually do what I
want. From what I can tell, WriteAttributeS tring can ONLY be applied to a
WriteStartEleme nt. Not a WriteElementStr ing.
So, as such, how does one do the above example where I want to add both an
attribute and content to an element?
-Darrel