[{"data":1,"prerenderedAt":736},["ShallowReactive",2],{"navigation_docs_en":3,"-en-core-formatter":237,"-en-core-formatter-surround":731},[4,23,61,91,163],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":22},"Getting Started","i-lucide-rocket","\u002Fen\u002Fgetting-started","en\u002F01.getting-started",[10,14,18],{"title":11,"path":12,"stem":13},"Introduction","\u002Fen\u002Fgetting-started\u002Fintroduction","en\u002F01.getting-started\u002F01.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fen\u002Fgetting-started\u002Finstallation","en\u002F01.getting-started\u002F02.installation",{"title":19,"path":20,"stem":21},"AI Integration","\u002Fen\u002Fgetting-started\u002Fai-integration","en\u002F01.getting-started\u002F03.ai-integration",false,{"title":24,"icon":25,"path":26,"stem":27,"children":28,"page":22},"CORE","i-lucide-box","\u002Fen\u002Fcore","en\u002F02.core",[29,33,37,41,45,49,53,57],{"title":30,"path":31,"stem":32},"@office-open\u002Fcore","\u002Fen\u002Fcore\u002Foverview","en\u002F02.core\u002F01.overview",{"title":34,"path":35,"stem":36},"XML Components","\u002Fen\u002Fcore\u002Fxml-components","en\u002F02.core\u002F02.xml-components",{"title":38,"path":39,"stem":40},"Values and Validation","\u002Fen\u002Fcore\u002Fvalues","en\u002F02.core\u002F03.values",{"title":42,"path":43,"stem":44},"Unit Converters","\u002Fen\u002Fcore\u002Fconverters","en\u002F02.core\u002F04.converters",{"title":46,"path":47,"stem":48},"Formatter","\u002Fen\u002Fcore\u002Fformatter","en\u002F02.core\u002F05.formatter",{"title":50,"path":51,"stem":52},"Parser","\u002Fen\u002Fcore\u002Fparser","en\u002F02.core\u002F06.parser",{"title":54,"path":55,"stem":56},"Archive","\u002Fen\u002Fcore\u002Farchive","en\u002F02.core\u002F07.archive",{"title":58,"path":59,"stem":60},"Charts","\u002Fen\u002Fcore\u002Fcharts","en\u002F02.core\u002F08.charts",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":22},"XML","i-lucide-code-xml","\u002Fen\u002Fxml","en\u002F03.xml",[67,71,75,79,83,87],{"title":68,"path":69,"stem":70},"@office-open\u002Fxml","\u002Fen\u002Fxml\u002Foverview","en\u002F03.xml\u002F01.overview",{"title":72,"path":73,"stem":74},"Parsing","\u002Fen\u002Fxml\u002Fparsing","en\u002F03.xml\u002F02.parsing",{"title":76,"path":77,"stem":78},"Serialization","\u002Fen\u002Fxml\u002Fserialization","en\u002F03.xml\u002F03.serialization",{"title":80,"path":81,"stem":82},"Query Utilities","\u002Fen\u002Fxml\u002Fquery-utilities","en\u002F03.xml\u002F04.query-utilities",{"title":84,"path":85,"stem":86},"XML Escape","\u002Fen\u002Fxml\u002Fescape","en\u002F03.xml\u002F05.escape",{"title":88,"path":89,"stem":90},"Type Reference","\u002Fen\u002Fxml\u002Ftypes","en\u002F03.xml\u002F06.types",{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":22},"DOCX","i-lucide-file-text","\u002Fen\u002Fdocx","en\u002F04.docx",[97,101,105,109,113,117,120,124,128,132,136,140,144,148,152,156,160],{"title":98,"path":99,"stem":100},"@office-open\u002Fdocx","\u002Fen\u002Fdocx\u002Foverview","en\u002F04.docx\u002F01.overview",{"title":102,"path":103,"stem":104},"Quick Start","\u002Fen\u002Fdocx\u002Fquickstart","en\u002F04.docx\u002F02.quickstart",{"title":106,"path":107,"stem":108},"Text and Paragraphs","\u002Fen\u002Fdocx\u002Ftext-and-paragraphs","en\u002F04.docx\u002F03.text-and-paragraphs",{"title":110,"path":111,"stem":112},"Tables","\u002Fen\u002Fdocx\u002Ftables","en\u002F04.docx\u002F04.tables",{"title":114,"path":115,"stem":116},"Images","\u002Fen\u002Fdocx\u002Fimages","en\u002F04.docx\u002F05.images",{"title":58,"path":118,"stem":119},"\u002Fen\u002Fdocx\u002Fcharts","en\u002F04.docx\u002F06.charts",{"title":121,"path":122,"stem":123},"SmartArt","\u002Fen\u002Fdocx\u002Fsmartart","en\u002F04.docx\u002F07.smartart",{"title":125,"path":126,"stem":127},"Media","\u002Fen\u002Fdocx\u002Fmedia","en\u002F04.docx\u002F08.media",{"title":129,"path":130,"stem":131},"Links","\u002Fen\u002Fdocx\u002Flinks","en\u002F04.docx\u002F09.links",{"title":133,"path":134,"stem":135},"Headers and Footers","\u002Fen\u002Fdocx\u002Fheaders-and-footers","en\u002F04.docx\u002F10.headers-and-footers",{"title":137,"path":138,"stem":139},"Equations and Symbols","\u002Fen\u002Fdocx\u002Fequations-and-symbols","en\u002F04.docx\u002F11.equations-and-symbols",{"title":141,"path":142,"stem":143},"Styles and Themes","\u002Fen\u002Fdocx\u002Fstyles-and-themes","en\u002F04.docx\u002F12.styles-and-themes",{"title":145,"path":146,"stem":147},"Page Layout","\u002Fen\u002Fdocx\u002Fpage-layout","en\u002F04.docx\u002F13.page-layout",{"title":149,"path":150,"stem":151},"References","\u002Fen\u002Fdocx\u002Freferences","en\u002F04.docx\u002F14.references",{"title":153,"path":154,"stem":155},"Comments and Revisions","\u002Fen\u002Fdocx\u002Fcomments-and-revisions","en\u002F04.docx\u002F15.comments-and-revisions",{"title":157,"path":158,"stem":159},"Export","\u002Fen\u002Fdocx\u002Fexport","en\u002F04.docx\u002F16.export",{"title":72,"path":161,"stem":162},"\u002Fen\u002Fdocx\u002Fparsing","en\u002F04.docx\u002F17.parsing",{"title":164,"icon":165,"path":166,"stem":167,"children":168,"page":22},"PPTX","i-lucide-presentation","\u002Fen\u002Fpptx","en\u002F05.pptx",[169,173,176,180,183,186,189,192,195,198,201,204,208,211,215,219,223,227,230,233],{"title":170,"path":171,"stem":172},"@office-open\u002Fpptx","\u002Fen\u002Fpptx\u002Foverview","en\u002F05.pptx\u002F01.overview",{"title":102,"path":174,"stem":175},"\u002Fen\u002Fpptx\u002Fquickstart","en\u002F05.pptx\u002F02.quickstart",{"title":177,"path":178,"stem":179},"Shapes and Text","\u002Fen\u002Fpptx\u002Fshapes-and-text","en\u002F05.pptx\u002F03.shapes-and-text",{"title":110,"path":181,"stem":182},"\u002Fen\u002Fpptx\u002Ftables","en\u002F05.pptx\u002F04.tables",{"title":114,"path":184,"stem":185},"\u002Fen\u002Fpptx\u002Fimages","en\u002F05.pptx\u002F05.images",{"title":58,"path":187,"stem":188},"\u002Fen\u002Fpptx\u002Fcharts","en\u002F05.pptx\u002F06.charts",{"title":121,"path":190,"stem":191},"\u002Fen\u002Fpptx\u002Fsmartart","en\u002F05.pptx\u002F07.smartart",{"title":125,"path":193,"stem":194},"\u002Fen\u002Fpptx\u002Fmedia","en\u002F05.pptx\u002F08.media",{"title":129,"path":196,"stem":197},"\u002Fen\u002Fpptx\u002Flinks","en\u002F05.pptx\u002F09.links",{"title":133,"path":199,"stem":200},"\u002Fen\u002Fpptx\u002Fheaders-and-footers","en\u002F05.pptx\u002F10.headers-and-footers",{"title":137,"path":202,"stem":203},"\u002Fen\u002Fpptx\u002Fequations-and-symbols","en\u002F05.pptx\u002F11.equations-and-symbols",{"title":205,"path":206,"stem":207},"Lines and Connectors","\u002Fen\u002Fpptx\u002Flines-and-connectors","en\u002F05.pptx\u002F12.lines-and-connectors",{"title":141,"path":209,"stem":210},"\u002Fen\u002Fpptx\u002Fstyles-and-themes","en\u002F05.pptx\u002F13.styles-and-themes",{"title":212,"path":213,"stem":214},"Effects and Fills","\u002Fen\u002Fpptx\u002Feffects-and-fills","en\u002F05.pptx\u002F14.effects-and-fills",{"title":216,"path":217,"stem":218},"Slide Layout","\u002Fen\u002Fpptx\u002Fslide-layout","en\u002F05.pptx\u002F15.slide-layout",{"title":220,"path":221,"stem":222},"Transitions","\u002Fen\u002Fpptx\u002Ftransitions","en\u002F05.pptx\u002F16.transitions",{"title":224,"path":225,"stem":226},"Animations","\u002Fen\u002Fpptx\u002Fanimations","en\u002F05.pptx\u002F17.animations",{"title":157,"path":228,"stem":229},"\u002Fen\u002Fpptx\u002Fexport","en\u002F05.pptx\u002F18.export",{"title":72,"path":231,"stem":232},"\u002Fen\u002Fpptx\u002Fparsing","en\u002F05.pptx\u002F19.parsing",{"title":234,"path":235,"stem":236},"Comments","\u002Fen\u002Fpptx\u002Fcomments","en\u002F05.pptx\u002F20.comments",{"id":238,"title":46,"body":239,"description":725,"extension":726,"links":727,"meta":728,"navigation":318,"path":47,"seo":729,"stem":48,"__hash__":730},"docs_en\u002Fen\u002F02.core\u002F05.formatter.md",{"type":240,"value":241,"toc":718},"minimark",[242,258,263,454,457,467,494,513,517,522,597,600,604,610,671,687,691,703,714],[243,244,245,246,249,250,253,254,257],"p",{},"The ",[247,248,46],"code",{}," converts ",[247,251,252],{},"XmlComponent"," trees into plain objects or XML strings. It is used internally by the ",[247,255,256],{},"Packer"," to serialize documents.",[259,260,262],"h2",{"id":261},"basic-usage","Basic Usage",[264,265,270],"pre",{"className":266,"code":267,"language":268,"meta":269,"style":269},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Formatter, XmlComponent } from \"@office-open\u002Fcore\";\n\nconst formatter = new Formatter();\n\nconst component = new XmlComponent(\"w:p\");\nconst context = { stack: [], file: {} };\n\nconst xmlObj = formatter.format(component, context);\n\u002F\u002F Returns IXmlableObject — a plain object representation\n","ts","",[247,271,272,313,320,344,349,378,413,418,447],{"__ignoreMap":269},[273,274,277,281,285,289,292,295,298,301,304,307,310],"span",{"class":275,"line":276},"line",1,[273,278,280],{"class":279},"s7zQu","import",[273,282,284],{"class":283},"sMK4o"," {",[273,286,288],{"class":287},"sTEyZ"," Formatter",[273,290,291],{"class":283},",",[273,293,294],{"class":287}," XmlComponent",[273,296,297],{"class":283}," }",[273,299,300],{"class":279}," from",[273,302,303],{"class":283}," \"",[273,305,30],{"class":306},"sfazB",[273,308,309],{"class":283},"\"",[273,311,312],{"class":283},";\n",[273,314,316],{"class":275,"line":315},2,[273,317,319],{"emptyLinePlaceholder":318},true,"\n",[273,321,323,327,330,333,336,339,342],{"class":275,"line":322},3,[273,324,326],{"class":325},"spNyl","const",[273,328,329],{"class":287}," formatter ",[273,331,332],{"class":283},"=",[273,334,335],{"class":283}," new",[273,337,288],{"class":338},"s2Zo4",[273,340,341],{"class":287},"()",[273,343,312],{"class":283},[273,345,347],{"class":275,"line":346},4,[273,348,319],{"emptyLinePlaceholder":318},[273,350,352,354,357,359,361,363,366,368,371,373,376],{"class":275,"line":351},5,[273,353,326],{"class":325},[273,355,356],{"class":287}," component ",[273,358,332],{"class":283},[273,360,335],{"class":283},[273,362,294],{"class":338},[273,364,365],{"class":287},"(",[273,367,309],{"class":283},[273,369,370],{"class":306},"w:p",[273,372,309],{"class":283},[273,374,375],{"class":287},")",[273,377,312],{"class":283},[273,379,381,383,386,388,390,394,397,400,402,405,407,410],{"class":275,"line":380},6,[273,382,326],{"class":325},[273,384,385],{"class":287}," context ",[273,387,332],{"class":283},[273,389,284],{"class":283},[273,391,393],{"class":392},"swJcz"," stack",[273,395,396],{"class":283},":",[273,398,399],{"class":287}," []",[273,401,291],{"class":283},[273,403,404],{"class":392}," file",[273,406,396],{"class":283},[273,408,409],{"class":283}," {}",[273,411,412],{"class":283}," };\n",[273,414,416],{"class":275,"line":415},7,[273,417,319],{"emptyLinePlaceholder":318},[273,419,421,423,426,428,431,434,437,440,442,445],{"class":275,"line":420},8,[273,422,326],{"class":325},[273,424,425],{"class":287}," xmlObj ",[273,427,332],{"class":283},[273,429,430],{"class":287}," formatter",[273,432,433],{"class":283},".",[273,435,436],{"class":338},"format",[273,438,439],{"class":287},"(component",[273,441,291],{"class":283},[273,443,444],{"class":287}," context)",[273,446,312],{"class":283},[273,448,450],{"class":275,"line":449},9,[273,451,453],{"class":452},"sHwdD","\u002F\u002F Returns IXmlableObject — a plain object representation\n",[259,455,456],{"id":436},"format()",[243,458,459,460,462,463,466],{},"Converts an ",[247,461,252],{}," tree to an ",[247,464,465],{},"IXmlableObject"," — a plain JavaScript object that can be further processed:",[264,468,470],{"className":266,"code":469,"language":268,"meta":269,"style":269},"const xmlObj = formatter.format(component, context);\n",[247,471,472],{"__ignoreMap":269},[273,473,474,476,478,480,482,484,486,488,490,492],{"class":275,"line":276},[273,475,326],{"class":325},[273,477,425],{"class":287},[273,479,332],{"class":283},[273,481,430],{"class":287},[273,483,433],{"class":283},[273,485,436],{"class":338},[273,487,439],{"class":287},[273,489,291],{"class":283},[273,491,444],{"class":287},[273,493,312],{"class":283},[243,495,496,497,500,501,504,505,508,509,512],{},"The returned object follows the xml-js ",[247,498,499],{},"Element"," structure with ",[247,502,503],{},"name",", ",[247,506,507],{},"attributes",", and ",[247,510,511],{},"elements"," fields.",[259,514,516],{"id":515},"formattoxml","formatToXml()",[243,518,459,519,521],{},[247,520,252],{}," tree directly to an XML string:",[264,523,525],{"className":266,"code":524,"language":268,"meta":269,"style":269},"const xml = formatter.formatToXml(component, context);\n\u002F\u002F '\u003C?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\\n\u003Cw:p\u002F>'\n\nconst xmlNoDecl = formatter.formatToXml(component, context, false);\n\u002F\u002F '\u003Cw:p\u002F>'\n",[247,526,527,551,556,560,592],{"__ignoreMap":269},[273,528,529,531,534,536,538,540,543,545,547,549],{"class":275,"line":276},[273,530,326],{"class":325},[273,532,533],{"class":287}," xml ",[273,535,332],{"class":283},[273,537,430],{"class":287},[273,539,433],{"class":283},[273,541,542],{"class":338},"formatToXml",[273,544,439],{"class":287},[273,546,291],{"class":283},[273,548,444],{"class":287},[273,550,312],{"class":283},[273,552,553],{"class":275,"line":315},[273,554,555],{"class":452},"\u002F\u002F '\u003C?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\\n\u003Cw:p\u002F>'\n",[273,557,558],{"class":275,"line":322},[273,559,319],{"emptyLinePlaceholder":318},[273,561,562,564,567,569,571,573,575,577,579,582,584,588,590],{"class":275,"line":346},[273,563,326],{"class":325},[273,565,566],{"class":287}," xmlNoDecl ",[273,568,332],{"class":283},[273,570,430],{"class":287},[273,572,433],{"class":283},[273,574,542],{"class":338},[273,576,439],{"class":287},[273,578,291],{"class":283},[273,580,581],{"class":287}," context",[273,583,291],{"class":283},[273,585,587],{"class":586},"sfNiH"," false",[273,589,375],{"class":287},[273,591,312],{"class":283},[273,593,594],{"class":275,"line":351},[273,595,596],{"class":452},"\u002F\u002F '\u003Cw:p\u002F>'\n",[243,598,599],{},"The third parameter controls whether to include the XML declaration.",[259,601,603],{"id":602},"context","Context",[243,605,245,606,609],{},[247,607,608],{},"IContext"," object is passed through the component tree during formatting:",[264,611,613],{"className":266,"code":612,"language":268,"meta":269,"style":269},"interface IContext\u003CTFileData = {}> {\n    stack: BaseXmlComponent[];\n    file: TFileData;\n}\n",[247,614,615,639,654,666],{"__ignoreMap":269},[273,616,617,620,624,627,630,633,636],{"class":275,"line":276},[273,618,619],{"class":325},"interface",[273,621,623],{"class":622},"sBMFI"," IContext",[273,625,626],{"class":283},"\u003C",[273,628,629],{"class":622},"TFileData",[273,631,632],{"class":283}," =",[273,634,635],{"class":283}," {}>",[273,637,638],{"class":283}," {\n",[273,640,641,644,646,649,652],{"class":275,"line":315},[273,642,643],{"class":392},"    stack",[273,645,396],{"class":283},[273,647,648],{"class":622}," BaseXmlComponent",[273,650,651],{"class":287},"[]",[273,653,312],{"class":283},[273,655,656,659,661,664],{"class":275,"line":322},[273,657,658],{"class":392},"    file",[273,660,396],{"class":283},[273,662,663],{"class":622}," TFileData",[273,665,312],{"class":283},[273,667,668],{"class":275,"line":346},[273,669,670],{"class":283},"}\n",[672,673,674,681],"ul",{},[675,676,677,680],"li",{},[247,678,679],{},"stack"," — Tracks the current component hierarchy",[675,682,683,686],{},[247,684,685],{},"file"," — Carries file-level data (media, relationships, etc.)",[259,688,690],{"id":689},"when-to-use","When to Use",[243,692,693,694,696,697,699,700,702],{},"You typically don't use ",[247,695,46],{}," directly. The ",[247,698,256],{}," handles serialization automatically. Use ",[247,701,46],{}," when you need to:",[672,704,705,708,711],{},[675,706,707],{},"Inspect the XML output of a component tree",[675,709,710],{},"Build custom export pipelines",[675,712,713],{},"Debug component structures",[715,716,717],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":269,"searchDepth":315,"depth":315,"links":719},[720,721,722,723,724],{"id":261,"depth":315,"text":262},{"id":436,"depth":315,"text":456},{"id":515,"depth":315,"text":516},{"id":602,"depth":315,"text":603},{"id":689,"depth":315,"text":690},"Convert XmlComponent trees to serializable XML objects and strings","md",null,{},{"title":46,"description":725},"o8vBZP2D_CjHuqJa_eb71ZFdw9pYGYVRuu2INZZFkw8",[732,734],{"title":42,"path":43,"stem":44,"description":733,"children":-1},"Convert between OOXML measurement units — TWIP, EMU, pixels, inches, points",{"title":50,"path":51,"stem":52,"description":735,"children":-1},"Parse and modify existing OOXML documents with ParsedDocument",1778862994494]