Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
REXML and XPath
Roland Schmitt
3/26/2005 7:30:00 PM
Hi,
i want to select the <ds:Signature> element in the following xml
document (shortend):
<env:Envelope xmlns:env="
http://schemas.xmlsoap.org/soap/envel...
...
<env:Header>
<wsse:Security env:mustUnderstand="1" ...
<wsse:BinarySecurityToken ...
<ds:Signature xmlns:ds="
http://www.w3.org/2000/...
...
<ds:SignedInfo> ...
I have tried various approachs with REXML and XPATH like
e=XPath.match(doc, "/env:Envelope/env:Header/wsse:Security/ds:Signature")
but it returns only an empty array.
e=XPath.match(doc, "/env:Envelope/env:Header/wsse:Security")
returns the <wsse:Security> element as expected.
Any hints?
Regards,
Roland
2 Answers
Phlip
3/26/2005 7:36:00 PM
0
Roland Schmitt wrote:
> I have tried various approachs with REXML and XPATH like
>
> e=XPath.match(doc, "/env:Envelope/env:Header/wsse:Security/ds:Signature")
XPath.first() ?
--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUser...
Mark T
3/27/2005 4:55:00 AM
0
Hi Roland.
I've spent some time with Rexml.
The preface is that the Rexml tut page is feature packed.
http://www.germane-software.com/software/rexml/docs/tut...
Most questions you will come across in your first months are answered
on this page. Amazingly.
Second tip is to make the xml 'doc' a 'Rexml doc' before you try any
Rex actions.
Nod to T-Rex soft tissue .... 'what could go wrong?'.
Markt
On Sun, 27 Mar 2005 04:29:56 +0900, Roland Schmitt
<Roland.Schmitt@web.de> wrote:
> Hi,
>
> i want to select the <ds:Signature> element in the following xml
> document (shortend):
>
> <env:Envelope xmlns:env="
http://schemas.xmlsoap.org/soap/envel...
...
> <env:Header>
> <wsse:Security env:mustUnderstand="1" ...
> <wsse:BinarySecurityToken ...
> <ds:Signature xmlns:ds="
http://www.w3.org/2000/...
...
> <ds:SignedInfo> ...
>
> I have tried various approachs with REXML and XPATH like
>
> e=XPath.match(doc, "/env:Envelope/env:Header/wsse:Security/ds:Signature")
>
> but it returns only an empty array.
>
> e=XPath.match(doc, "/env:Envelope/env:Header/wsse:Security")
>
> returns the <wsse:Security> element as expected.
>
> Any hints?
>
> Regards,
>
> Roland
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
REXML and XPath
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password