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

  • SEARCH
  • Home
  • 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 9209403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:50:04+00:00 2026-06-18T00:50:04+00:00

Im trying to get a XML node (with children) as string but had no

  • 0

Im trying to get a XML node (with children) as string but had no success.

Here my xml

    <?xml version="1.0" encoding="UTF-8"?>
<params>
  <main_settings>
    <id>23</account_id>
    <test/>
    <logo_url/>
    <app appid="test_12">
      <d:tag xmlns:c="http://mypage.com/test2" id="mypage_id_256" type="mypage_type_test">
        <path-info value="show"/>
      </d:tag>
    </app>
  </main_settings>
</params>

This is not working.

    $var->params->main_settings->app;

Is there a way to get with simpleXML a nodes (“app”) childs as sting?

  • 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-18T00:50:05+00:00Added an answer on June 18, 2026 at 12:50 am

    You can call the asXml method on the child:

    $var->params->main_settings->app->asXml();
    

    It’s also possible via typecasting:

    (string)$var->params->main_settings->app
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get the number of children that a node has but
Hi I am trying to get my mind around XSDs, XML and namespaces but
I'm trying to add a child to an XML-node by loading a string as
I'm trying to get all of the attributes and node values from XML in
I am trying to get an attribute of an xml node example: <Car name=Test>
I have an XML file with orders. <?xml version=1.0 encoding=UTF-8?> <orders> <order order-no=1234567> <order-date>2012-09-15T12:28:45.000Z</order-date>
I have the following XML: <?xml version=1.0 encoding=UTF-8?> <gnm:Workbook xmlns:gnm=http://www.gnumeric.org/v10.dtd xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://www.gnumeric.org/v9.xsd> <office:document-meta xmlns:office=urn:oasis:names:tc:opendocument:xmlns:office:1.0
I am trying to get the value of an attribute of an XML node
I am trying to get the CDATA content of an XML node using XSL.
I trying to parse a string in an XML node by using an XPath

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.