ctr.getTArray() yields empty array when running these two lines: CTR ctr = CTR.Factory.parse("<w:r xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"><w:t>primary </w:t></w:r>"); CTText[] cttexts = ctr.getTArray();
(In reply to NadavB from comment #0) > ctr.getTArray() yields empty array when running these two lines: > > CTR ctr = CTR.Factory.parse("<w:r > xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"><w: > t>primary </w:t></w:r>"); > > CTText[] cttexts = ctr.getTArray(); Use this way: CTR ctr = CTR.Factory.parse("<w:t xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\">primary</w:t>");
Thanks, it works, but how can it be? Shouldn't a CTR parse get a valid CTR xml section, represented by <w:r> ?
I am not an expert on the underlying XML, but I think oyu only provide the inner XML here, and the "w:r" is actually provided via the CTR.Factory anyway. Anyway I don't think there is anything for Apache POI to fix, so closing this for now.