Module spreadsheet_ods::xmltree [−][src]
Defines an XML-Tree. This is used for parts of the spreadsheet that are not destructured in detail, but simply passed through. With a little bit of luck there is still some meaning left after modifying the rest.
use spreadsheet_ods::xmltree::XmlTag; use spreadsheet_ods::xmltree::AttrMap2Trait; let tag = XmlTag::new("table:shapes") .tag(XmlTag::new("draw:frame") .attr("draw:z", "0") .attr("draw:name", "Bild 1") .attr("draw:style:name", "gr1") .attr("draw:text-style-name", "P1") .attr("svg:width", "10.198cm") .attr("svg:height", "1.75cm") .attr("svg:x", "0cm") .attr("svg:y", "0cm") .tag(XmlTag::new("draw:image") .attr_slice(&[ ("xlink:href", "Pictures/10000000000011D7000003105281DD09B0E0B8D4.jpg".into()), ("xlink:type", "simple".into()), ("xlink:show", "embed".into()), ("xlink:actuate", "onLoad".into()), ("loext:mime-type", "image/jpeg".into()), ]) .tag(XmlTag::new("text:p") .text("sometext") ) ) ); // or let mut tag = XmlTag::new("table:shapes"); tag.set_attr("draw:z", "0".to_string()); tag.set_attr("draw:name", "Bild 1".to_string()); tag.set_attr("draw:style:name", "gr1".to_string()); let mut tag2 = XmlTag::new("draw:image"); tag2.set_attr("xlink:type", "simple".to_string()); tag2.set_attr("xlink:show", "embed".to_string()); tag2.add_text("some text"); tag.add_tag(tag2);
Structs
AttrMap2 | Container type for attributes. |
XmlTag | Defines a XML tag and it’s children. |
Enums
XmlContent | Values of the content vec. |
Traits
AttrMap2Trait | Allows forwarding for structs that contain an AttrMap2 |