Click here to Skip to main content
16,011,501 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: newbie needs xsl help Pin
Sushant_Mathur14-Nov-05 0:23
Sushant_Mathur14-Nov-05 0:23 
QuestionConnecting Applications together Pin
kourvoisier11-Nov-05 4:26
kourvoisier11-Nov-05 4:26 
AnswerRe: Connecting Applications together Pin
Curtis Schlak.24-Nov-05 14:57
Curtis Schlak.24-Nov-05 14:57 
QuestionDifferentiate XML files with OpenFileDialog Pin
softplanner11-Nov-05 3:31
softplanner11-Nov-05 3:31 
QuestionPassing a xml object in C# Pin
pavan bhatara8-Nov-05 0:17
pavan bhatara8-Nov-05 0:17 
QuestionXML nomenclature/structure question Pin
Vikram A Punathambekar6-Nov-05 19:56
Vikram A Punathambekar6-Nov-05 19:56 
AnswerRe: XML nomenclature/structure question Pin
Shog922-Nov-05 6:51
sitebuilderShog922-Nov-05 6:51 
QuestionCan't parse SOAP with XPath Pin
Zhornyk5-Nov-05 3:19
Zhornyk5-Nov-05 3:19 
I develop web service with extensions that encrypt and compress some parameters of web method.

So I need get certain node("soap:Envelope/soap:Body/SendServiceDataInHeader/Body") in SOAP
message(got by serialization of web method) with XPath expression.

Here is SOAP message:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<ProtocolData xmlns="http://tempuri.org/">
<IsEncrypted>true</IsEncrypted>
<IsCompressed>true</IsCompressed>
</ProtocolData>
</soap:Header>
<soap:Body>
<SendServiceDataInHeader xmlns="http://tempuri.org/">
<To>zhornick@mail.ru</To>
<Cc />
<Subject>Subj</Subject>
<Body>Body</Body>
</SendServiceDataInHeader>
</soap:Body>
</soap:Envelope>

I tried with below code snippet but it doesn't work. It may be due to default namespace.

XmlDocument xd = new XmlDocument();

xd.Load("d:\\x.xml");

XmlNamespaceManager nm = new XmlNamespaceManager(xd.NameTable);

nm.AddNamespace("soap", "http://schemas.xmlsoap.org/soap/envelope/");

nm.AddNamespace(String.Empty, "http://tempuri.org/");

XmlNode n =
xd.SelectSingleNode("soap:Envelope/soap:Body/SendServiceDataInHeader/Body", nm);

Of course I can get this node by writing:

XmlNode n =
xd.SelectSingleNode("soap:Envelope/soap:Body",
nm).FirstChild.FirstChild.NextSibling.NextSibling;

but it is not reliable and I want through direct XPath expression.

Help me resolve task please!


Andriy Zhornyk
QuestionVBA / XML Pin
stevenho2-Nov-05 12:13
stevenho2-Nov-05 12:13 
QuestionGetting IE to pass a file in XML format with a custom extension to my C#/Winforms application Pin
timothymfox31-Oct-05 6:45
timothymfox31-Oct-05 6:45 
QuestionProblem changing class field from string to Class Pin
Jason Pease31-Oct-05 0:59
Jason Pease31-Oct-05 0:59 
Questionsyntax error '&lt;' Pin
gr8coaster32930-Oct-05 15:17
gr8coaster32930-Oct-05 15:17 
AnswerRe: syntax error '&lt;' Pin
Christian Graus30-Oct-05 16:05
protectorChristian Graus30-Oct-05 16:05 
GeneralRe: syntax error '&lt;' Pin
gr8coaster32930-Oct-05 17:09
gr8coaster32930-Oct-05 17:09 
GeneralRe: syntax error '&lt;' Pin
Christian Graus30-Oct-05 17:17
protectorChristian Graus30-Oct-05 17:17 
GeneralRe: syntax error '&amp;lt;' Pin
gr8coaster32931-Oct-05 9:28
gr8coaster32931-Oct-05 9:28 
GeneralRe: syntax error '&amp;amp;lt;' Pin
Christian Graus31-Oct-05 10:54
protectorChristian Graus31-Oct-05 10:54 
Questionshould i use flash or director with my xml? Pin
lezlea29-Oct-05 21:03
lezlea29-Oct-05 21:03 
AnswerRe: should i use flash or director with my xml? Pin
Sushant_Mathur14-Nov-05 20:10
Sushant_Mathur14-Nov-05 20:10 
QuestionXSLT stylesheet Pin
HpLif28-Oct-05 8:25
HpLif28-Oct-05 8:25 
Questionproblem in updation Pin
Nadia stoichov26-Oct-05 17:45
sussNadia stoichov26-Oct-05 17:45 
AnswerRe: problem in updation Pin
Denevers14-Nov-05 13:39
Denevers14-Nov-05 13:39 
AnswerRe: problem in updation Pin
Sushant_Mathur14-Nov-05 19:54
Sushant_Mathur14-Nov-05 19:54 
QuestionSOAP via stdin/stdout - how? Pin
Carsten Leue25-Oct-05 8:33
Carsten Leue25-Oct-05 8:33 
Questionhow can i insert image in .chm file with the help of xml comments?? Pin
parvinder sehrawat23-Oct-05 21:23
parvinder sehrawat23-Oct-05 21:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.