There is a time for all good things to come to an end, and the time has come to shut down OpenXmlDeveloper.org.
Screen-casts and blog posts: Content on OpenXmlDeveloper.org will be moving to EricWhite.com.
Forums: We are moving the forums to EricWhite.com and StackOverflow.com. Please do not post in the forums on OpenXmlDeveloper.org. Instead, please post in the forums at EricWhite.com or at StackOverflow.com.
Please see this blog post for more information about my plans moving forward. Cheers, Eric
I am new to openxml. I am trying to read all the contents from a particular content control which may include text, images, charts. Basically I want to read all the contents from the control.
Any help would be appreciated.
The markup for the content of a content control will be inside the w:sdtContent element. You can find the content control by tag or title, and then you can then programmably access the content in the w:sdtContent element.
My question, what do you want to do with the content after you read it? I can better give you guidance if you let me know what your scenario is - what are you accomplishing
Follow on Twitter
We have documents with content controls stored in server. When user makes request for a particular content, we know which control to look for that information. whatever content (text, images, charts) present in the control has to be read and stored in an xml file to process by the web development team to display that to the user.
I am able to retrieve text by following some of your post. But I am finding difficulties in getting all the contents from the control. Do I have to loop for text, image, charts separately or is there any way that I can get all the contents in one go.
Thanks for your assistance.
What is the schema of the XML file? Do you have to transform the WordprocessingML XML into some other form? There are multiple ways to transform to HTML - is this what you are trying to do?
My question is - once you have the content of the content control, what programming operations do you need to take on that content, beyond retrieving the text? What do you need to do with images, charts, and etc?
Yes. I am trying to transform to HTML.
Are you writing the transform from scratch? Or using PowerTools HtmlConverter as a base?
I am writing it from scratch. You can guide me in any method, so that I can retrieve chart.
If you can wait for a few days, I will be releasing a new version of the HtmlConverter, part of PowerTools for Open XML. I believe that it will handle charts properly.
Just want to help you avoid unnecessary effort.