harsh2
April 10, 2024, 1:29pm
1
I have part of XML like this :
</nc:EntityPerson>], [<nc:EntityPerson s:id=“Attorney”
xmlns:s=“http://niem.gov/niem/structures/2.0 ” xmlns:nc=“http://niem.gov/niem/niem-
core/2.0”>
nc:PersonName
nc:PersonGivenName Alpha </nc:PersonGivenName>
nc:PersonMiddleName Z. </nc:PersonMiddleName>
nc:PersonSurName Gamma </nc:PersonSurName>
</nc:PersonName>
</nc:EntityPerson>] }
I want to extract the PersonGivenName,Middle Name& Surname for ID = “Attorney”… Please advise.
Hi @harsh2 ,
if posuble share full xml.
thanks,
harsh2
April 10, 2024, 1:44pm
3
when I use XDoc.Root.Descendants(in_Xnc+“EntityPerson”) this is what I get.
XML.txt (1.2 KB)
ppr
(Peter Preuss)
April 10, 2024, 1:56pm
4
harsh2
April 10, 2024, 2:44pm
6
Here is the full XML as text file. I want to extract attorney’s full name.
XML.txt (11.0 KB)
ppr
(Peter Preuss)
April 10, 2024, 2:55pm
7
so we need the nc and s namespace as XNamespace Variables
And can filter the descendants to:
From the return we can retrieve the name details
harsh2
April 10, 2024, 3:23pm
8
Thank you ! Is there anyway we can get the value for “PersonName” ??? or how to retrieve the ‘PersonGivenName’ only ?
ppr
(Peter Preuss)
April 10, 2024, 3:37pm
9
will be done as usually we do the retrieval alonng with namespace handling
OR
We recommend to go again through all applied things and concepts to get more famillar on what was done. As the most of shared starters help were just variations of already shared base concepts
system
(system)
Closed
April 13, 2024, 3:37pm
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.