GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes Regular expression for valid namespaces? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Regular expression for valid namespaces?" Watch "Regular expression for valid namespaces?" New topic
Author

Regular expression for valid namespaces?

David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

We have some code which parses incomming SOAP requests before deserialisation so that some data can be extracted in case the deserialisation process fails. The only problem is that the soap namespace is hardcoded so the code fails if the client uses a different value, as some of them do.

What we actually do is find the <soapns:Body ... > tag so we can look at he one directly after it, but rather than hardcode I was going to use the RE to match the desired entry and then find the index location, which utilises existing code.

Is this likely to work or cause issues if the message has its own Body element in another ns?



Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regular expression for valid namespaces?