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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:42:46+00:00 2026-06-04T17:42:46+00:00

I have the following XML: <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/> <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <MessageRequest></MessageRequest> </SOAP-ENV:Envelope> I am

  • 0

I have the following XML:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <MessageRequest></MessageRequest>
</SOAP-ENV:Envelope>

I am accessing the name of the child element like this:

childNode(SOAP-ENV:Body").ChildNodes(0).Name, but if there is a space between elements, the child node name returns "\n ", but if I remove the space I get the correct child node, for example, if there is a space between <SOAP-ENV:Body> and <MessageRequest>, the first child will return "\n ", but if there is no space, it will return <MessageRequest>

  • 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-04T17:42:47+00:00Added an answer on June 4, 2026 at 5:42 pm

    You are not mentioning the language you are using, but based on your profile, the name of the ChildNodes property and indexing with round brackets instead of square brackets, I think VB.NET?

    This situation can happen if you are using a document that preserves white space. A DOM parser works at a node level. Each component of the XML is a node. You can have a text node, a CDATA node, an element node etc. These will get picked up by the ChildNodes property and the number of children will vary.

    Check the node types of the nodes you are working with.

    If you have indented elements then that indentation (spaces, line feed etc) becomes the first child. Remove formatting and the first child should be an element child.

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

Sidebar

Related Questions

I have the following xml; <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header> <mm7:TransactionID xmlns:mm7='http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4' env:mustUnderstand='1'>6797324d</mm7:TransactionID> </env:Header> <env:Body> <DeliveryReportReq
I have the following XML: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:axis=http://ws.apache.org/axis2> <soapenv:Header/> <soapenv:Body> <axis:ErrorQueueInput> <errorStr>JIRA Topic</errorStr> <InputMessage>
I have the following XML : <s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/> <s:Body> <GetCustomerCentreDetailsResponse xmlns=http://tempuri.org/> <GetCustomerCentreDetailsResult xmlns:i=http://www.w3.org/2001/XMLSchema-instance xmlns:a=http://schemas.datacontract.org/2004/07/*****>
I have the following code: $body = <SOAP-ENV:Envelope>.$data.</SOAP-ENV:Envelope>; $ch = curl_init($FD_Add); curl_setopt($ch, CURLOPT_POST, 1);
I have an XML/Soap file that looks like this: <?xml version=1.0 encoding=utf-8?> <soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope
I have the following XML: http://pastebin.com/QiRK72BK which is generated in response to a REST
I have the following string loaded to an XML document: <?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope
I have an SOAP response that looks similar to this: <?xml version=1.0 encoding=UTF-8?> <soapenv:Envelope
I need to have this node in my SOAP Request (using 1.1): <CredentialsHeader xmlns=http://www.url.com/Services/P24ListingService11
I have following xml file: <ab> <![CDATA[ <table> <tbody> <tr> <th>abcdef</th> </tr> <tr> <p>

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.