locked
namespace prefix issue in xml RRS feed

  • Question

  • hi all

    i am running one sulution and trapped at one place,i am looping through nodes with xpath and i have one node at a time in my xmlDocument which has following xml

    <userDetails xmlns="http://SqlRowLooping">
            <userID>1</userID>
            <fName>niladri</fName>
            <lName>Roy</lName>
            <department>hr</department>
    </userDetails>

    but now my schema takes following xml

    <ns0:userDetails xmlns:ns0="http://SqlRowLooping">
            <userID>1</userID>
            <fName>niladri</fName>
            <lName>Roy</lName>
            <department>hr</department>
    </ns0:userDetails>

    so it is not validating..i do not know from where this ns0 is coming,what to do? i have taken custom xmlst to validate it without ns:0 but it is always appending ns:0 in my input xml,either i can add ns:0 to my root node that will do the work or i will have to remove it from my soruce schema,so plz help me in this context
    Monday, March 8, 2010 7:05 AM

Answers

All replies

  • similar thread http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/c19bbc0d-c1ce-45ba-b70f-fe0a96a94bca
    Thanks, Raja
    Monday, March 8, 2010 7:21 AM
  • this talks about removing the ns:0 but i do not have ns:0 in my xml so what i need to is add ns:0 to my xml and den i can pas it to send pipe line and i think the map will fet validated but i do not know how to do it
    Monday, March 8, 2010 7:52 AM
  • I can see two options here:

    1) Use a construct block inside your orchestration to create schema type message from your XMLDocument message.
    -- For this you have to use message assignment shap inside construct block.

    2) Pass your XMLDocument message itself and modify inside the pipeline
    -- In this case you have to write custom pipeline and within pipeline you will change your XMLDocument message as required. Inside pipeline components you can write .NET code to change your message.


    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    Monday, March 8, 2010 8:43 AM
  • Monday, March 8, 2010 8:57 AM
  • i am already assigning xmlDoc to my message which is i am sending to send port but my xml document does not contain ns0 in root element as in namespace and hene it is not getting validated,if i put static harcoded same xml but with ns:0 it is validating and inserting properly....
    Monday, March 8, 2010 9:34 AM
  • solved.........created xslt using this helpful link

    http://objectmix.com/xml-soap/319603-how-add-prefix-root-element.html

    thxs all
    Monday, March 8, 2010 2:21 PM