Bug 64851 - ctr.getTArray() returns empty array
Summary: ctr.getTArray() returns empty array
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-26 20:50 UTC by NadavB
Modified: 2020-10-29 13:02 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NadavB 2020-10-26 20:50:03 UTC
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();
Comment 1 Sayi 2020-10-27 07:12:20 UTC
(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>");
Comment 2 NadavB 2020-10-29 13:02:36 UTC
Thanks, it works, but how can it be?
Shouldn't a CTR parse get a valid CTR xml section, represented by <w:r> ?