html - Nesting Open Office XML -


in html can following:

<span id="outsidespan">     <span id="insidespan>        text     </span> </span> 

the innerhtml of span can non-blocking html element. in open office xml there isn't natural "inner html" between run tags. might think of tag being similar in holds "content" of run. question is, can following?

<w:r>     <w:t>          <w:hyperlink r:id="rid4">              <w:r>                 <w:rpr>                     <w:rstyle w:val="hyperlink"/>                 </w:rpr>                 <w:t>google</w:t>              </w:r>          </w:hyperlink>     </w:t> </w:r> 

would validate arbitrary "parent w:t" element?

background: goal here sort of backwards example. want programatically alter existing word document arbitrarily selected run "surrounded" hyperlink.

short answer: no, can't posted in question because not valid according office open xml schema.

what need in order insert hyperlink need break existing run multiple runs , add hyperlink element @ higher level (and not below w:t element):

<w:p>   <w:ppr>     <w:rpr>       <w:lang w:val="en-us" />     </w:rpr>   </w:ppr>   <w:r>     <w:rpr>       <w:lang w:val="en-us" />     </w:rpr>     <w:t xml:space="preserve">this link </w:t>   </w:r>   <w:hyperlink r:id="rid4"          xmlns:r="http://schemas.openxmlformats.org/officedocument/2006/relationships">     <w:r>       <w:rpr>         <w:rstyle w:val="hyperlink" />         <w:lang w:val="en-us" />       </w:rpr>       <w:t>google</w:t>     </w:r>   </w:hyperlink>   <w:r>     <w:rpr>       <w:lang w:val="en-us" />     </w:rpr>     <w:t xml:space="preserve"> web site.</w:t>   </w:r> </w:p> 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -