0

I consume a soap webservice.In response , I want to remove namespace prefix from tag elements. How can I do ?

I want to convert as example <common_v26:ActionStatu/> to <ActionStatu/>

1 Answer 1

1

You can use a regex replace

var str = "<common_v26:ActionStatus/>"
str = str.replace(/(<\s*)(.+:)/, "$1")  // str is now <ActionStatus/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.