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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:17:17+00:00 2026-06-13T23:17:17+00:00

I have got two problems with using xml. First Problem: This code working correct.

  • 0

I have got two problems with using xml.

First Problem:

This code working correct. If argument have only one child but not list of childs.

doc.getDocumentElement().getChildNodes().item(t).getLastChild().getNodeValue() 

I would like to prepare something like this:

If(doc.getDocumentElement().getChildNodes().item(t).getLastChild().getNodeValue() !=null)

but this doesn’t work because value is never empty but I need similar If which can check is list of value or not.

Normal Node:

<name>Adam</name>

List Node:

<car>
<tire>yes</tire>
<trunk>yes</trunk>
</car>

Second Problem:

If I make nested ChildNodes I`m not able to take value do you know where is a problem?

Example of node:

<name>Adam</name>

If I wrire this I get “name”

doc.getDocumentElement().getChildNodes().item(t).getChildNodes().item(m).getNodeName()

If I will write this I will get null but I need “Adam”

doc.getDocumentElement().getChildNodes().item(t).getChildNodes().item(m).getNodeName()
  • 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-13T23:17:18+00:00Added an answer on June 13, 2026 at 11:17 pm

    answer – I should use ToLenght() > 1

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

Sidebar

Related Questions

Problem in brief I have got a piece of working two dimensional scrolling code.
I got a probably small problem using memcmp. I have two arrays (length =
I am working on network programming using epoll and I have this code... int
i got a problem by using CrudRepository. Example: i have two entities, entity A
I have the following problem. I got two forms on my web page. On
I have the following problem: I got a view with two text fields and
I've got the following problem: I have two tables: (simplified) +--------+ +-----------+ | User
I have got two pages. example.com/php.com and example.com. I use this function to set
I have two problems I am trying to solve, one is refreshing the tab
Hy, I have a problem in a nested form. Actually, I have two problems,

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.