|
-
Feb 4th, 2009, 05:39 AM
#1
Thread Starter
Addicted Member
Convert string to XML
Hi,
I am using Asp.Net 2.0 application. I have a string like
"jason.orgstatusavailableclasskeydomorg" continuously. Actually this string like
jason.org
status
available
class key
domorg
I got it like jason.orgstatusavailableclasskeydomorg this .How can i convert this in xml.
Hope your's reply.
Thanks & Regards
Failing to plan is Planning to fail 
-
Feb 4th, 2009, 05:52 AM
#2
Re: Convert string to XML
Where do you get this string from ?
Please mark you thread resolved using the Thread Tools as shown
-
Feb 4th, 2009, 05:54 AM
#3
Thread Starter
Addicted Member
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???
Failing to plan is Planning to fail 
-
Feb 4th, 2009, 06:12 AM
#4
Re: Convert string to XML
Post your hash table method you are using for this one
Please mark you thread resolved using the Thread Tools as shown
-
Feb 4th, 2009, 04:36 PM
#5
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|