Re: Convert string to XML
Where do you get this string from ?
Re: Convert string to XML
I got this string from hash table. Now i need to convert this string to a xml file.
Could you tell the suggestion to me???
Re: Convert string to XML
Post your hash table method you are using for this one
Re: Convert string to XML
First, define your schema. Create a node for each part. For example (don't use this)
Code:
<userinfo>
<site>jason.org</site>
<stat>status</stat>
<av>available</av>
<ck>class key</ck>
<domain>domorg</domain>
</userinfo>
You then take your string and parse it for the various keys and then create the XML. Creating the XML can occur in many different ways. Many, many, many different ways. You could write straight to an XML file using a TextWriter or you could declare a new XmlDocument and start appending elements and children to it.