Click here to Skip to main content
15,899,014 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Is there any possible way to read data of child nodes of xml below. Because of the header node's namespace, i cant read inner node's values


<?xml version="1.0" ?>
<Header xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<H1>A</H1>
<H2>B</H2>
<H3>C</H3>
<H4>D</H4>
</Header>


without namespace of header node's like below can reads values of inner nodes. Any advice please


<pre><?xml version="1.0" ?>
<Header>
<H1>A</H1>
<H2>B</H2>
<H3>C</H3>
<H4>D</H4>
</Header>


What I have tried:

I tried to replace the header node and still no any progress
Posted
Updated 29-Oct-18 7:51am
v6
Comments
Dave Kreskowiak 29-Oct-18 8:05am    
Impossible to answer because you haven't said anything about how you're writing this XML file.
Kolpher 29-Oct-18 8:24am    
I updated the questions. Actually i need to read node's data. Because of the header node data reading is not working
Dave Kreskowiak 29-Oct-18 12:22pm    
OK, same problem. You haven't explained anything at all about how you', now, reading the XML file. What code are you using to read the file?
chandraprakashkabra 29-Oct-18 10:42am    
Your question is not clearly explain.
Please give some more explanation so we can try to provide solution.
F-ES Sitecore 29-Oct-18 10:55am    
You're trying to solve this the wrong way. If the extra data in the header is causing your code to fail then google how to use xml namespaces with your chosen method of reading the xml.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900