Error XML Deserialization: The ':' character, hexadecimal value 0x3A, cannot be included in a name

Hello Community -

I am getting an issue while fetching xml values. It pops up the below error message.

“For Each: The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name”

I need to fetch the request id value from the below XML to use further -

<env:Envelope xmlns:env=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:wsa=“http://www.w3.org/2005/08/addressing”>
env:Header
wsa:ActionsubmitRequest</wsa:Action>
wsa:MessageIDurn:uuid:136fd538-9ec0-4519-b7ca-9c5749fd03cd</wsa:MessageID>
wsa:RelatesTourn:uuid:bc779307-1819-4667-8cec-b246405011a1</wsa:RelatesTo>
</env:Header>
env:Body
<ns0:submitRequestResponse xmlns:ns0=“http://xmlns.oracle.com/scheduler”>
287054
</ns0:submitRequestResponse>
</env:Body>
</env:Envelope>

Kindly help.

Thanks,
Vinay

@VinayTiwari
your xml is defining a namespace and we have to handle this.
For a first starter help have a look here

and also another example:
XMLWithNameSpace_GetAttribute.xaml (5.0 KB)
demoNamespaceGetAttribute.xml (166 Bytes)

Let us know your further questions. With a sample xml from your end we can also adress your scenario individually

@ppr - Thanks for your response.

Yeah, for sure we need to handle the namespaces here, just looking out the way to handle it. Few of the activities are missing from attached “Main.xaml” bot. Kindly upload the “Main.xaml” bot here.

Thanks,
Vinay

@VinayTiwari
in general do this:

define the name space (datatype XNamespace)

and use it for the name
grafik

Thanks @ppr.

I tried with above mentioned steps but no luck. Here my xml structure is different in comparison to yours.

******************************** XML ********************************************
<env:Envelope xmlns:env=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:wsa=“http://www.w3.org/2005/08/addressing”>
env:Header
wsa:ActionsubmitRequest</wsa:Action>
wsa:MessageIDurn:uuid:136fd538-9ec0-4519-b7ca-9c5749fd03cd</wsa:MessageID>
wsa:RelatesTourn:uuid:bc779307-1819-4667-8cec-b246405011a1</wsa:RelatesTo>
</env:Header>
env:Body
<ns0:submitRequestResponse xmlns:ns0=“http://xmlns.oracle.com/scheduler”>
287054
</ns0:submitRequestResponse>
</env:Body>
</env:Envelope>


It seems we have handled the namespaces but “:” is still causing issues. I tried to put the same sign into variable and use the variable into code but that also didn’t worked.

Below is what i tired so far -

  1. Declared the namespaces.

  2. Use in code.

@VinayTiwari
please share XML as file or use the format </> button from editor. The sample is not readable.
Thanks

also have a look on the demos we do use NameSpaceVar + Elementname and not env:… here the colon is maybe causing the issue. please correct your code accordingly

As Envelope is the root we can ommit Envelope:
XMLResult.Root.Element(NameSpace1 + “Body”).Element(Namespace3 + “submitRequestResponse”).Value.toString could work as far the broken shared XML is get interpretated

another example also here: