Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class BlockXml
- Object
- BlockXml
The .cn1doc XML of a list of blocks, for formats that hold document text inside their own
files. A slide’s text box is a list of blocks, and .cn1slides stores it in exactly the
vocabulary .cn1doc stores a document body in, so both read and write it the same way.
Not an end-user API: it works on the internal XML reader and writer of the office formats.
Methods
Inherited methods
Method details
write
public static void write(XmlOut x, List<Block> blocks)
throws IOExceptionWrites blocks as
.cn1doc elements.Parameters
xXmlOut- the writer, inside an element of the caller’s
blocksList<Block>- the blocks
Throws
IOException- when writing fails
read
public static boolean read(XmlScanner x, List<Block> out, Set<String> ids)
throws IOExceptionReads the block whose start tag the scanner is on.
Parameters
xXmlScanner- the scanner, on a start tag
outList<Block>- receives the block
idsSet<String>- the ids read so far, shared by everything in one file; a repeated id is an error
Returns
false when the element is not a block, and the caller should skip it
Throws
IOException- when the block is damaged