Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As we know, office2007 is based on standard of OOXML,using zip ,we can see many parts from package,take word2007 for example ,we can see documents、styles、setting and so on .But I meet a problem,how to get all elements and attributes in each part,is there any method know all attributes in each part? thanks!
Posted
Comments
Zoltán Zörgő 8-Oct-12 9:35am    
What attributes are you thinking of?
kennethman 8-Oct-12 9:39am    
all elements' attributes in a part ,for document.xml,all valid elements and attributes can be include in above part.
Zoltán Zörgő 8-Oct-12 9:46am    
Is till don't understand what you want exactly.
Parse the xmls and look for the attributes you need. Please, give some concrete examples.
kennethman 8-Oct-12 9:57am    
now ,some people can use insignificant attrbutes hide secret messages in xml part of office,for example,"<sheet name="Sheet1" sheetid="1" r:id="rId1" cccc="789">",the attribute "cccc" is invlaid or insignificant (not match ooxml),so I want to get all valid attributes in a xml part based on ooxml,to detect "cccc" is invalid.

1 solution

You can use OpenXmlValidator[^] for this. It can validate either just an element, a single package part or the whole package (file) and it does it by validating them over the WordprocessingML, SpreadsheetML, PresentationML, DrawingML, etc... XML's schemas.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900