using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
{
string pattern = @"<b:ProductKeyStateID>.*</b:ProductKeyStateID>";
string input = RequestResult();
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
static String RequestResult(){
string input = @"
--uuid:572ea376-67c5-4d00-bffd-549fc02b77d4+id=28
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type=application/soap+xml
<s:Envelope xmlns:s=http://www.w3.org/2003/05/soap-envelope xmlns:a=http://www.w3.org/2005/08/addressing><s:Header><a:Action s:mustUnderstand=1>http://tempuri.org/IOA30FFKIWCF/GetDPKStatusByWIP_SNResponse</a:Action></s:Header><s:Body><GetDPKStatusByWIP_SNResponse xmlns=http://tempuri.org/><GetDPKStatusByWIP_SNResult xmlns:b=com.compal.oa30 xmlns:i=http://www.w3.org/2001/XMLSchema-instance><b:Customer_Code i:nil=true/><b:ErrorDescription/><b:OEMPartNumber i:nil=true/><b:Plant_Code i:nil=true/><b:Product i:nil=true/><b:ProductKey>MBWCR-43N77-6GDK6-KQV6T-PDK2M</b:ProductKey><b:ProductKeyID>3424334527449</b:ProductKeyID><b:ProductKeyStateID>3</b:ProductKeyStateID><b:Status>true</b:Status><b:WIP_SN>4003189900003</b:WIP_SN></GetDPKStatusByWIP_SNResult></GetDPKStatusByWIP_SNResponse></s:Body></s:Envelope>
--uuid:572ea376-67c5-4d00-bffd-549fc02b77d4+id=28--
";
return input;
}
}
Replies to XML
Title |
Name |
Language |
UNIX |
When |
Re: XML |
Funky Leech |
dos |
1679668935 |
1 Year ago. |
Re: XML |
Gamboge Cheetah |
csharp |
1679665359 |
1 Year ago. |
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}