SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had some content types and some XSN infopath files... I can link it by web interface and this works well but I must do this connection during feature activated event...

So... Is there any code to assign some XSN to a CT?

Thank you very much!

share|improve this question
up vote 0 down vote accepted

The only way I now of is by manipulate the XmlDocuments property. The tag to insert looks like this:

<XmlDocument NamespaceURI=""><ntns:customXsn xmlns:ntns="

See more here:

and here:

share|improve this answer

You can publish your Infopath form to your site using SharePoint WSP , it will create a contentType for you.For details , you can have look at here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.