vb.net - Reading Element Value from xml message with multiple namespaces -


I am very new to XML in Linux. I am trying to get the Element value of the MSGID node in this message:

   & Lt; / Nsah: AuditHeader & gt; & Lt; / Soapenv: Header & gt; & Lt; Soapenv: body & gt; & Lt; NS5: CREATEPMNT_FSFS_REQ xsi: schemaLocation = "http://fcubs.ofss.com/service/FCUBSCPGServices CommPmntGtwyCreate-Request-Full.xsd" xmlns: NS5 = "http://fcubs.ofss.com/service/FCUBSCPGServices" & gt; ; & Lt; NS5: FCUBS_HEADER & gt; & Lt; NS5: Source & gt; Source & lt; / NS5: Source & gt; & Lt; NS5: UBSCOMP & gt; FCUBS & lt; / NS5: UBSCOMP> & Lt; NS5: msgId> MsgiD01236549876546351321 & lt; / NS5: msgId> & Lt; NS5: USERID & gt; UID & lt; / NS5: USERID & gt; & Lt; NS5: Branch & gt; Branch & lt; / NS5: Branch & gt; & Lt; NS5: MODULEID & gt; Middle & lt; / NS5: MODULEID & gt; & Lt; NS5: Service & gt; Service & lt; / NS5: Service & gt; & Lt; NS5: Operations & gt; Operation & lt; / NS5: Operations & gt; & Lt; NS5: DESTINATION & gt; Destination & lt; / NS5: DESTINATION & gt; & Lt; / NS5: FCUBS_HEADER & gt; & Lt; NS5: FCUBS_BODY & gt; & Lt; NS5: PmntDETAILS & gt; & Lt; NS5: xref & gt; XREF321654987 & lt; / NS5: xref & gt; & Lt; NS5 is: AMOUNT & gt; 0.09 000 & lt; / NS5: AMOUNT & gt; & Lt; NS5: VALUE_DATE & gt; 2012-12-20 & lt; / NS5: VALUE_DATE & gt; & Lt; NS5: CCY & gt; Euro & lt; / NS5: CCY & gt; & Lt; NS5: CUST_AC_NO & gt; 123456789 & lt; / NS5: CUST_AC_NO & gt; & Lt; NS5: CPTY_AC_NO & gt; 987,654,321 & lt; / NS5: CPTY_AC_NO & gt; & Lt; / NS5: PmntDETAILS & gt; & Lt; / NS5: FCUBS_BODY & gt; & Lt; / NS5: CREATEPMNT_FSFS_REQ & gt; & Lt; / Soapenv: Body & gt; & Lt; / Soapenv: envelope & gt;   

is that I have time:

  dim XDoc form XDocument = XDocument.Load (Variable_Echo.OpenedFile) Dim XNs_soapenv as XNamespace = " Http: //schemas.xmlsoap.org/soap/envelope/ "Dim XNs_ns5 =" http://fcubs.ofss.com/service/FCUBSCPGServices "Slim Body = XDoc.Descendants (XNs_soapenv +" The Body ") SlowMsgId = the body. When I get my code I get the following errro on msgid = "additional information: ':' Character, hexadecimal value 0x3A, can not be included. On a name. " 

Support is very much appreciated

you declare indirectly As the XNs_ns5 string is therefore: XNs_ns5 + "MSGID" means the concatenated string that represents the element name instead of the prefix + element name. Because the element name should not contain the colon (: ), this expression will trigger the error XNs_ns5 to declare the change XNamespace and Error will go:

  Dim XNs_ns5 as XNamespace = "http: //fcubs.ofss .com / service / FCUBSCPG Services"    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -