I am facing one issue in while trying to extract Data From a XML file. Exception is coming as “The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name.”
My Requirement is to get Nodes text of TNumber Node With TicketedPCC Attribute as “YYYY”. I have used xmlDocument.Elements but facing some issue as I am having one node with having “:” in the node name. If there is any better way capture, then please suggest.
I have attached my workflow for reference. Thank you.
Hello @Yoichi - First of all, Thanks for the response, Very Helpful.
I was trying to understand this namespace thing, and concluded that this will only work when we have unique tag name. In any xml file where ever there is a Node TNumber, It will pick data. But I can see there is a risk of using this, that is because TNumber can present inside more two different Parent Node. For example There are TNumber nodes present in one parent node TNode1 and TNode2. In this case we need TNumber data present inside TNode2. But if we try using the solution it will provide me output of both the parent node.
Can we solve the above problem using Namespace?
Can you provide me some useful links where I can learn more things on the Namespace.
Can you provide me some useful links where I can learn more things on the Namespace.
Unfortunately, I’m not familiar with good xml learning site in English because my native language is not English. However, as xml is mature technology, there are many good site in the internet. We’ll be able to find it by search engine easily, I think.
Thanks @Yoichi. Just saw your comment with the solution, Thanks for that.
Before seeing your comment I was trying this and solved. I can see I have used the same approach what you mentioned in the comment.
But I need one thing to understand. We are using xns variable that is storing the default name space. We are using that for each time we are looking for Descendants. Can I know, what it does actually?
deserilizedXML.Descendants(xns+“JXTSTranRequest”)
I have printed that in the Output and it was printed as JXTS.
Added File With Solution for any learner’s references: TestProcess - V3.zip (5.3 KB)
@ppr I went though your link. I am bit confused in that link. Can you use my existing xml file and provide me sample code to understand this. input1.xml (1.1 KB)
I have gone through this links (For XML Details) what you shared. It is helpful. Thank you. @ppr - Can you please take a look?
[quote=“Ashish6541, post:1, topic:270280”]
I am facing one issue in while trying to extract Data From a XML file. Exception is coming as “The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name.”