Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:47:13+00:00 2026-06-06T17:47:13+00:00

So, I’ve got a SMS service posting data to an ASP page. The data

  • 0

So, I’ve got a SMS service posting data to an ASP page.

The data is coming in as HTML encoded xml. It looks like this when I read it from the InputStream directly:

 Content-Disposition: form-data; name="xml"

<POSTBACK>
    <NOTIFICATION id="4254" created="2012-07-02 13:35:46.629214-04">
    <ORIGIN>SMS_MO</ORIGIN>
    <CODE>N211</CODE>
    <BODY><FROM>+15035555555</FROM><TO>60856</TO><TEXT>cats are cats</TEXT><RECEIVED>2012-07-02 13:35:46.038477-04</RECEIVED></BODY>
    </NOTIFICATION>
</POSTBACK>
------------------------------fde0d0d3bf3c--

I know I can manually go in and replace the character codes and then read it into an XmlDoc… which is what I am doing for time’s sake.

What I’m wondering is if there is a native data type or built-in class to handle XML form data?

Tried:

string cleanString = HttpUtility.HtmlDecode(strRawtext);

but it looks the same for some reason.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:47:13+00:00Added an answer on June 6, 2026 at 5:47 pm

    HttpUtility.HtmlDecode Method should be able to handle this.

    This worked fine for me:

    private static void HtmlDecodeTest()
    {
        string html = @"
    <POSTBACK>
        <NOTIFICATION id=""4254"" created=""2012-07-02 13:35:46.629214-04"">
        <ORIGIN>SMS_MO</ORIGIN>
        <CODE>N211</CODE>
        <BODY><FROM>+15035555555</FROM><TO>60856</TO><TEXT>cats are cats</TEXT><RECEIVED>2012-07-02 13:35:46.038477-04</RECEIVED></BODY>
        </NOTIFICATION>
    </POSTBACK>";
    
        string x = HttpUtility.HtmlDecode(html);
        Console.WriteLine(x);
    }
    

    Results:

            <POSTBACK>
                <NOTIFICATION id="4254" created="2012-07-02 13:35:46.629214-04">
                <ORIGIN>SMS_MO</ORIGIN>
                <CODE>N211</CODE>
                <BODY><FROM>+15035555555</FROM><TO>60856</TO><TEXT>cats are cats</TE
    XT><RECEIVED>2012-07-02 13:35:46.038477-04</RECEIVED></BODY>
                </NOTIFICATION>
            </POSTBACK>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
this is what i have right now Drawing an RSS feed into the php,
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.