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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:36:26+00:00 2026-06-14T10:36:26+00:00

Hi can anyone show me how I can read xml tags with their values

  • 0

Hi can anyone show me how I can read xml tags with their values with SimpleXML btw. I am building an android app.

I need to get all tags and values that are inside the root element:

<RootElement>
   <UnknownTab>UnkownValue</UnkownTab>
   <AnotherUnknownTab>UnkownValue</AnotherUnknownTab>
</RootElement>

The number of elements inside the RootElement is also unkown and can be different everytime.

UPDATE:

I am already using SimpleXml for every other serialization I am doing so i don’t want to use another XML-parsing tool.
The question is how to do this with SimpleXml and not how to serialize a xml.

UPDATE 2:
I have reviewed the XML (its a bit complex) the definition is the following:

xsd-definition:

<element-sequence> 
   <element name="actualName" ..../>
   <element name="actualName" ..../>
   <element name="actualName" ..../>
   .
   .
   .
</element-sequence>

the size of element-sequence is variable
and the tags of the elements inside the RootElement are the actualNames

<RootElement>
   <actualName>UnkownValue</actualName>
   <actualName>UnkownValue</actualName>
   .
   .
   .
</RootElement>

Is there any way to serialize this, if possible with SimpleXML

  • 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-14T10:36:27+00:00Added an answer on June 14, 2026 at 10:36 am

    Looks like this is impossible using SimpleXML, done the job using XPath.

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

Sidebar

Related Questions

Can anyone show me how to build a simple XML document using XMERL? The
Can anyone show a short and simple code snippet? It should take the name
can anyone show me the syntax for inserting a python tuple/list into a mysql
Can anyone show me a way of converting SQL Server data-types (varchar for example)
Can anyone show me how to create a mathematical expression for the number of
Can anyone show me how to make a UIManagedDocument globally accessible?
I'd like to do this in the INSERT SQL. Can anyone show me. Thanks
can anyone recommend a website crawler that can show me all of the links
Does anyone know how I can show a tooltip whenever a user hovers over
Can anyone show me how to format the MediaStore.Video.Media.DATE_MODIFIED to the human readable date

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.