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 8008449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:08:33+00:00 2026-06-04T18:08:33+00:00

Im trying to get a string from a mysql database and handle it like

  • 0

Im trying to get a string from a mysql database and handle it like an xml object, navigation etc.

i got an sql table with a “longtext” field wich stores my xml file as a simple string. I do the select on the database and i get the string but only the info, not the tags etc.

Is there any way to select a string from a mysql database (xml formated), get it to php and work with it as a xml file ?

thanks in advance

  • 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-04T18:08:35+00:00Added an answer on June 4, 2026 at 6:08 pm

    Retrieve the string from the database then load it into SimpleXML:

    $xmlObj = new SimpleXMLElement($xmlstr);
    

    From there you can manipulate the xml object with the SimpleXML libray.

    If you are retrieving the string and echoing it to a browser, and you only see the content of the tags (with no <>) then that is because the browser is interpreting them as HTML tags. If you use the browsers view->source you’ll see the plain XML as a string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get a std::string from my database using mysql connexion Here is
I'm trying to get the JSON object from a JSON outputted string from a
I'm having a 'mare trying to get some simple data from my MySQL database.
I'm trying to call book details from the relationships table in my database, mysql
I am trying to query a MySQL database using webpy. From the SQL query,
I am trying to read a UTF-8 string from my MySql database, which I
Im trying to get data from a mysql database and display it in an
I'm trying to get the query string from a string (not the current URL).
I'm trying to get a json string back from my controller, that is prefill-values
I'm trying to convert date formats in javascript. I get a string from a

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.