[{"data":1,"prerenderedAt":1334},["ShallowReactive",2],{"navigation_docs_en":3,"-en-core-parser":335,"-en-core-parser-surround":1329},[4,31,61,91,175,256],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting Started","i-lucide-rocket","\u002Fen\u002Fgetting-started","en\u002F01.getting-started",[10,14,18,22,26],{"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},"Command Line Interface (CLI)","\u002Fen\u002Fgetting-started\u002Fcommand-line-interface","en\u002F01.getting-started\u002F03.command-line-interface",{"title":23,"path":24,"stem":25},"AI Tools","\u002Fen\u002Fgetting-started\u002Fai-tools","en\u002F01.getting-started\u002F04.ai-tools",{"title":27,"path":28,"stem":29},"AI Integration","\u002Fen\u002Fgetting-started\u002Fai-integration","en\u002F01.getting-started\u002F05.ai-integration",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"CORE","i-lucide-box","\u002Fen\u002Fcore","en\u002F02.core",[37,41,45,49,53,57],{"title":38,"path":39,"stem":40},"@office-open\u002Fcore","\u002Fen\u002Fcore\u002Foverview","en\u002F02.core\u002F01.overview",{"title":42,"path":43,"stem":44},"Descriptor System","\u002Fen\u002Fcore\u002Fdescriptors","en\u002F02.core\u002F02.descriptors",{"title":46,"path":47,"stem":48},"Values and Validation","\u002Fen\u002Fcore\u002Fvalues","en\u002F02.core\u002F03.values",{"title":50,"path":51,"stem":52},"Unit Converters","\u002Fen\u002Fcore\u002Fconverters","en\u002F02.core\u002F04.converters",{"title":54,"path":55,"stem":56},"Charts","\u002Fen\u002Fcore\u002Fcharts","en\u002F02.core\u002F05.charts",{"title":58,"path":59,"stem":60},"Parser","\u002Fen\u002Fcore\u002Fparser","en\u002F02.core\u002F06.parser",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":30},"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":30},"DOCX","i-lucide-file-text","\u002Fen\u002Fdocx","en\u002F04.docx",[97,101,105,109,113,117,121,124,128,132,136,140,144,148,152,156,160,164,168,171],{"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":118,"path":119,"stem":120},"Text Boxes","\u002Fen\u002Fdocx\u002Ftextbox","en\u002F04.docx\u002F06.textbox",{"title":54,"path":122,"stem":123},"\u002Fen\u002Fdocx\u002Fcharts","en\u002F04.docx\u002F07.charts",{"title":125,"path":126,"stem":127},"SmartArt","\u002Fen\u002Fdocx\u002Fsmartart","en\u002F04.docx\u002F08.smartart",{"title":129,"path":130,"stem":131},"Media","\u002Fen\u002Fdocx\u002Fmedia","en\u002F04.docx\u002F09.media",{"title":133,"path":134,"stem":135},"Links","\u002Fen\u002Fdocx\u002Flinks","en\u002F04.docx\u002F10.links",{"title":137,"path":138,"stem":139},"Headers and Footers","\u002Fen\u002Fdocx\u002Fheaders-and-footers","en\u002F04.docx\u002F11.headers-and-footers",{"title":141,"path":142,"stem":143},"Equations and Symbols","\u002Fen\u002Fdocx\u002Fequations-and-symbols","en\u002F04.docx\u002F12.equations-and-symbols",{"title":145,"path":146,"stem":147},"Styles and Themes","\u002Fen\u002Fdocx\u002Fstyles-and-themes","en\u002F04.docx\u002F13.styles-and-themes",{"title":149,"path":150,"stem":151},"Page Layout","\u002Fen\u002Fdocx\u002Fpage-layout","en\u002F04.docx\u002F14.page-layout",{"title":153,"path":154,"stem":155},"References","\u002Fen\u002Fdocx\u002Freferences","en\u002F04.docx\u002F15.references",{"title":157,"path":158,"stem":159},"Comments and Revisions","\u002Fen\u002Fdocx\u002Fcomments-and-revisions","en\u002F04.docx\u002F16.comments-and-revisions",{"title":161,"path":162,"stem":163},"Document Properties","\u002Fen\u002Fdocx\u002Fproperties","en\u002F04.docx\u002F17.properties",{"title":165,"path":166,"stem":167},"Export","\u002Fen\u002Fdocx\u002Fexport","en\u002F04.docx\u002F18.export",{"title":72,"path":169,"stem":170},"\u002Fen\u002Fdocx\u002Fparsing","en\u002F04.docx\u002F19.parsing",{"title":172,"path":173,"stem":174},"Patching","\u002Fen\u002Fdocx\u002Fpatch","en\u002F04.docx\u002F20.patch",{"title":176,"icon":177,"path":178,"stem":179,"children":180,"page":30},"PPTX","i-lucide-presentation","\u002Fen\u002Fpptx","en\u002F05.pptx",[181,185,188,192,195,198,201,204,207,210,214,217,220,224,227,231,235,239,243,247,250,253],{"title":182,"path":183,"stem":184},"@office-open\u002Fpptx","\u002Fen\u002Fpptx\u002Foverview","en\u002F05.pptx\u002F01.overview",{"title":102,"path":186,"stem":187},"\u002Fen\u002Fpptx\u002Fquickstart","en\u002F05.pptx\u002F02.quickstart",{"title":189,"path":190,"stem":191},"Shapes and Text","\u002Fen\u002Fpptx\u002Fshapes-and-text","en\u002F05.pptx\u002F03.shapes-and-text",{"title":110,"path":193,"stem":194},"\u002Fen\u002Fpptx\u002Ftables","en\u002F05.pptx\u002F04.tables",{"title":114,"path":196,"stem":197},"\u002Fen\u002Fpptx\u002Fimages","en\u002F05.pptx\u002F05.images",{"title":54,"path":199,"stem":200},"\u002Fen\u002Fpptx\u002Fcharts","en\u002F05.pptx\u002F06.charts",{"title":125,"path":202,"stem":203},"\u002Fen\u002Fpptx\u002Fsmartart","en\u002F05.pptx\u002F07.smartart",{"title":129,"path":205,"stem":206},"\u002Fen\u002Fpptx\u002Fmedia","en\u002F05.pptx\u002F08.media",{"title":133,"path":208,"stem":209},"\u002Fen\u002Fpptx\u002Flinks","en\u002F05.pptx\u002F09.links",{"title":211,"path":212,"stem":213},"Lines and Connectors","\u002Fen\u002Fpptx\u002Flines-and-connectors","en\u002F05.pptx\u002F10.lines-and-connectors",{"title":137,"path":215,"stem":216},"\u002Fen\u002Fpptx\u002Fheaders-and-footers","en\u002F05.pptx\u002F11.headers-and-footers",{"title":141,"path":218,"stem":219},"\u002Fen\u002Fpptx\u002Fequations-and-symbols","en\u002F05.pptx\u002F12.equations-and-symbols",{"title":221,"path":222,"stem":223},"Slide Layout","\u002Fen\u002Fpptx\u002Fslide-layout","en\u002F05.pptx\u002F13.slide-layout",{"title":145,"path":225,"stem":226},"\u002Fen\u002Fpptx\u002Fstyles-and-themes","en\u002F05.pptx\u002F14.styles-and-themes",{"title":228,"path":229,"stem":230},"Effects and Fills","\u002Fen\u002Fpptx\u002Feffects-and-fills","en\u002F05.pptx\u002F15.effects-and-fills",{"title":232,"path":233,"stem":234},"Transitions","\u002Fen\u002Fpptx\u002Ftransitions","en\u002F05.pptx\u002F16.transitions",{"title":236,"path":237,"stem":238},"Animations","\u002Fen\u002Fpptx\u002Fanimations","en\u002F05.pptx\u002F17.animations",{"title":240,"path":241,"stem":242},"Comments","\u002Fen\u002Fpptx\u002Fcomments","en\u002F05.pptx\u002F18.comments",{"title":244,"path":245,"stem":246},"Presentation Properties","\u002Fen\u002Fpptx\u002Fproperties","en\u002F05.pptx\u002F19.properties",{"title":165,"path":248,"stem":249},"\u002Fen\u002Fpptx\u002Fexport","en\u002F05.pptx\u002F20.export",{"title":72,"path":251,"stem":252},"\u002Fen\u002Fpptx\u002Fparsing","en\u002F05.pptx\u002F21.parsing",{"title":172,"path":254,"stem":255},"\u002Fen\u002Fpptx\u002Fpatch","en\u002F05.pptx\u002F22.patch",{"title":257,"icon":258,"path":259,"stem":260,"children":261,"page":30},"XLSX","i-lucide-table-2","\u002Fen\u002Fxlsx","en\u002F06.xlsx",[262,266,269,273,277,281,285,289,292,295,299,303,307,311,314,318,322,326,329,332],{"title":263,"path":264,"stem":265},"@office-open\u002Fxlsx","\u002Fen\u002Fxlsx\u002Foverview","en\u002F06.xlsx\u002F01.overview",{"title":102,"path":267,"stem":268},"\u002Fen\u002Fxlsx\u002Fquickstart","en\u002F06.xlsx\u002F02.quickstart",{"title":270,"path":271,"stem":272},"Cells & Data","\u002Fen\u002Fxlsx\u002Fcells","en\u002F06.xlsx\u002F03.cells",{"title":274,"path":275,"stem":276},"Styles","\u002Fen\u002Fxlsx\u002Fstyles","en\u002F06.xlsx\u002F04.styles",{"title":278,"path":279,"stem":280},"Merge, Columns & Rows","\u002Fen\u002Fxlsx\u002Fmerge-col-row","en\u002F06.xlsx\u002F05.merge-col-row",{"title":282,"path":283,"stem":284},"Hyperlinks","\u002Fen\u002Fxlsx\u002Flinks","en\u002F06.xlsx\u002F06.links",{"title":286,"path":287,"stem":288},"Pivot Tables","\u002Fen\u002Fxlsx\u002Fpivot-tables","en\u002F06.xlsx\u002F07.pivot-tables",{"title":114,"path":290,"stem":291},"\u002Fen\u002Fxlsx\u002Fimages","en\u002F06.xlsx\u002F08.images",{"title":54,"path":293,"stem":294},"\u002Fen\u002Fxlsx\u002Fcharts","en\u002F06.xlsx\u002F09.charts",{"title":296,"path":297,"stem":298},"Page Setup & Headers\u002FFooters","\u002Fen\u002Fxlsx\u002Fpage-setup","en\u002F06.xlsx\u002F10.page-setup",{"title":300,"path":301,"stem":302},"Formulas","\u002Fen\u002Fxlsx\u002Fformulas","en\u002F06.xlsx\u002F11.formulas",{"title":304,"path":305,"stem":306},"Freeze Panes & Auto Filter","\u002Fen\u002Fxlsx\u002Ffreeze-filter","en\u002F06.xlsx\u002F12.freeze-filter",{"title":308,"path":309,"stem":310},"Data Validation","\u002Fen\u002Fxlsx\u002Fvalidation","en\u002F06.xlsx\u002F13.validation",{"title":240,"path":312,"stem":313},"\u002Fen\u002Fxlsx\u002Fcomments","en\u002F06.xlsx\u002F14.comments",{"title":315,"path":316,"stem":317},"Protection","\u002Fen\u002Fxlsx\u002Fprotection","en\u002F06.xlsx\u002F15.protection",{"title":319,"path":320,"stem":321},"Shared Workbook Revisions","\u002Fen\u002Fxlsx\u002Frevisions","en\u002F06.xlsx\u002F16.revisions",{"title":323,"path":324,"stem":325},"Workbook Properties","\u002Fen\u002Fxlsx\u002Fproperties","en\u002F06.xlsx\u002F17.properties",{"title":165,"path":327,"stem":328},"\u002Fen\u002Fxlsx\u002Fexport","en\u002F06.xlsx\u002F18.export",{"title":72,"path":330,"stem":331},"\u002Fen\u002Fxlsx\u002Fparsing","en\u002F06.xlsx\u002F19.parsing",{"title":172,"path":333,"stem":334},"\u002Fen\u002Fxlsx\u002Fpatch","en\u002F06.xlsx\u002F20.patch",{"id":336,"title":58,"body":337,"description":1323,"extension":1324,"links":1325,"meta":1326,"navigation":438,"path":59,"seo":1327,"stem":60,"__hash__":1328},"docs_en\u002Fen\u002F02.core\u002F06.parser.md",{"type":338,"value":339,"toc":1312},"minimark",[340,361,366,488,492,497,670,674,768,772,802,806,856,860,1105,1109,1118,1308],[341,342,343,344,348,349,352,353,356,357,360],"p",{},"The parser reads ",[345,346,347],"code",{},".docx",", ",[345,350,351],{},".pptx",", and ",[345,354,355],{},".xlsx"," files into a ",[345,358,359],{},"ParsedArchive"," that provides a key-value store interface for accessing and modifying XML parts.",[362,363,365],"h2",{"id":364},"parse-a-document","Parse a Document",[367,368,373],"pre",{"className":369,"code":370,"language":371,"meta":372,"style":372},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { readFileSync } from \"node:fs\";\nimport { parseArchive } from \"@office-open\u002Fcore\";\n\nconst data = readFileSync(\"document.docx\");\nconst doc = parseArchive(data);\n","ts","",[345,374,375,411,433,440,471],{"__ignoreMap":372},[376,377,380,384,388,392,395,398,401,405,408],"span",{"class":378,"line":379},"line",1,[376,381,383],{"class":382},"s7zQu","import",[376,385,387],{"class":386},"sMK4o"," {",[376,389,391],{"class":390},"sTEyZ"," readFileSync",[376,393,394],{"class":386}," }",[376,396,397],{"class":382}," from",[376,399,400],{"class":386}," \"",[376,402,404],{"class":403},"sfazB","node:fs",[376,406,407],{"class":386},"\"",[376,409,410],{"class":386},";\n",[376,412,414,416,418,421,423,425,427,429,431],{"class":378,"line":413},2,[376,415,383],{"class":382},[376,417,387],{"class":386},[376,419,420],{"class":390}," parseArchive",[376,422,394],{"class":386},[376,424,397],{"class":382},[376,426,400],{"class":386},[376,428,38],{"class":403},[376,430,407],{"class":386},[376,432,410],{"class":386},[376,434,436],{"class":378,"line":435},3,[376,437,439],{"emptyLinePlaceholder":438},true,"\n",[376,441,443,447,450,453,456,459,461,464,466,469],{"class":378,"line":442},4,[376,444,446],{"class":445},"spNyl","const",[376,448,449],{"class":390}," data ",[376,451,452],{"class":386},"=",[376,454,391],{"class":455},"s2Zo4",[376,457,458],{"class":390},"(",[376,460,407],{"class":386},[376,462,463],{"class":403},"document.docx",[376,465,407],{"class":386},[376,467,468],{"class":390},")",[376,470,410],{"class":386},[376,472,474,476,479,481,483,486],{"class":378,"line":473},5,[376,475,446],{"class":445},[376,477,478],{"class":390}," doc ",[376,480,452],{"class":386},[376,482,420],{"class":455},[376,484,485],{"class":390},"(data)",[376,487,410],{"class":386},[362,489,491],{"id":490},"parsedarchive-api","ParsedArchive API",[493,494,496],"h3",{"id":495},"read-parts","Read Parts",[367,498,500],{"className":369,"code":499,"language":371,"meta":372,"style":372},"\u002F\u002F Read an XML part as an Element tree\nconst styles = doc.get(\"word\u002Fstyles.xml\");\n\n\u002F\u002F Read binary data (images, media)\nconst image = doc.getRaw(\"word\u002Fmedia\u002Fimage1.png\");\n\n\u002F\u002F Check if a part exists\ndoc.has(\"word\u002Fdocument.xml\"); \u002F\u002F true\n\n\u002F\u002F List all paths\ndoc.keys(); \u002F\u002F [\"[Content_Types].xml\", \"word\u002Fdocument.xml\", ...]\ndoc.keys(\"word\u002Fmedia\u002F\"); \u002F\u002F [\"word\u002Fmedia\u002Fimage1.png\"]\n",[345,501,502,508,539,543,548,577,582,588,616,621,627,645],{"__ignoreMap":372},[376,503,504],{"class":378,"line":379},[376,505,507],{"class":506},"sHwdD","\u002F\u002F Read an XML part as an Element tree\n",[376,509,510,512,515,517,520,523,526,528,530,533,535,537],{"class":378,"line":413},[376,511,446],{"class":445},[376,513,514],{"class":390}," styles ",[376,516,452],{"class":386},[376,518,519],{"class":390}," doc",[376,521,522],{"class":386},".",[376,524,525],{"class":455},"get",[376,527,458],{"class":390},[376,529,407],{"class":386},[376,531,532],{"class":403},"word\u002Fstyles.xml",[376,534,407],{"class":386},[376,536,468],{"class":390},[376,538,410],{"class":386},[376,540,541],{"class":378,"line":435},[376,542,439],{"emptyLinePlaceholder":438},[376,544,545],{"class":378,"line":442},[376,546,547],{"class":506},"\u002F\u002F Read binary data (images, media)\n",[376,549,550,552,555,557,559,561,564,566,568,571,573,575],{"class":378,"line":473},[376,551,446],{"class":445},[376,553,554],{"class":390}," image ",[376,556,452],{"class":386},[376,558,519],{"class":390},[376,560,522],{"class":386},[376,562,563],{"class":455},"getRaw",[376,565,458],{"class":390},[376,567,407],{"class":386},[376,569,570],{"class":403},"word\u002Fmedia\u002Fimage1.png",[376,572,407],{"class":386},[376,574,468],{"class":390},[376,576,410],{"class":386},[376,578,580],{"class":378,"line":579},6,[376,581,439],{"emptyLinePlaceholder":438},[376,583,585],{"class":378,"line":584},7,[376,586,587],{"class":506},"\u002F\u002F Check if a part exists\n",[376,589,591,594,596,599,601,603,606,608,610,613],{"class":378,"line":590},8,[376,592,593],{"class":390},"doc",[376,595,522],{"class":386},[376,597,598],{"class":455},"has",[376,600,458],{"class":390},[376,602,407],{"class":386},[376,604,605],{"class":403},"word\u002Fdocument.xml",[376,607,407],{"class":386},[376,609,468],{"class":390},[376,611,612],{"class":386},";",[376,614,615],{"class":506}," \u002F\u002F true\n",[376,617,619],{"class":378,"line":618},9,[376,620,439],{"emptyLinePlaceholder":438},[376,622,624],{"class":378,"line":623},10,[376,625,626],{"class":506},"\u002F\u002F List all paths\n",[376,628,630,632,634,637,640,642],{"class":378,"line":629},11,[376,631,593],{"class":390},[376,633,522],{"class":386},[376,635,636],{"class":455},"keys",[376,638,639],{"class":390},"()",[376,641,612],{"class":386},[376,643,644],{"class":506}," \u002F\u002F [\"[Content_Types].xml\", \"word\u002Fdocument.xml\", ...]\n",[376,646,648,650,652,654,656,658,661,663,665,667],{"class":378,"line":647},12,[376,649,593],{"class":390},[376,651,522],{"class":386},[376,653,636],{"class":455},[376,655,458],{"class":390},[376,657,407],{"class":386},[376,659,660],{"class":403},"word\u002Fmedia\u002F",[376,662,407],{"class":386},[376,664,468],{"class":390},[376,666,612],{"class":386},[376,668,669],{"class":506}," \u002F\u002F [\"word\u002Fmedia\u002Fimage1.png\"]\n",[493,671,673],{"id":672},"write-parts","Write Parts",[367,675,677],{"className":369,"code":676,"language":371,"meta":372,"style":372},"import { Element } from \"@office-open\u002Fxml\";\n\n\u002F\u002F Write an XML part\ndoc.set(\"word\u002Fstyles.xml\", modifiedStylesElement);\n\n\u002F\u002F Write binary data\ndoc.setRaw(\"word\u002Fmedia\u002Fimage2.png\", imageBuffer);\n",[345,678,679,700,704,709,734,738,743],{"__ignoreMap":372},[376,680,681,683,685,688,690,692,694,696,698],{"class":378,"line":379},[376,682,383],{"class":382},[376,684,387],{"class":386},[376,686,687],{"class":390}," Element",[376,689,394],{"class":386},[376,691,397],{"class":382},[376,693,400],{"class":386},[376,695,68],{"class":403},[376,697,407],{"class":386},[376,699,410],{"class":386},[376,701,702],{"class":378,"line":413},[376,703,439],{"emptyLinePlaceholder":438},[376,705,706],{"class":378,"line":435},[376,707,708],{"class":506},"\u002F\u002F Write an XML part\n",[376,710,711,713,715,718,720,722,724,726,729,732],{"class":378,"line":442},[376,712,593],{"class":390},[376,714,522],{"class":386},[376,716,717],{"class":455},"set",[376,719,458],{"class":390},[376,721,407],{"class":386},[376,723,532],{"class":403},[376,725,407],{"class":386},[376,727,728],{"class":386},",",[376,730,731],{"class":390}," modifiedStylesElement)",[376,733,410],{"class":386},[376,735,736],{"class":378,"line":473},[376,737,439],{"emptyLinePlaceholder":438},[376,739,740],{"class":378,"line":579},[376,741,742],{"class":506},"\u002F\u002F Write binary data\n",[376,744,745,747,749,752,754,756,759,761,763,766],{"class":378,"line":584},[376,746,593],{"class":390},[376,748,522],{"class":386},[376,750,751],{"class":455},"setRaw",[376,753,458],{"class":390},[376,755,407],{"class":386},[376,757,758],{"class":403},"word\u002Fmedia\u002Fimage2.png",[376,760,407],{"class":386},[376,762,728],{"class":386},[376,764,765],{"class":390}," imageBuffer)",[376,767,410],{"class":386},[493,769,771],{"id":770},"remove-parts","Remove Parts",[367,773,775],{"className":369,"code":774,"language":371,"meta":372,"style":372},"doc.remove(\"word\u002Fsettings.xml\"); \u002F\u002F true if removed\n",[345,776,777],{"__ignoreMap":372},[376,778,779,781,783,786,788,790,793,795,797,799],{"class":378,"line":379},[376,780,593],{"class":390},[376,782,522],{"class":386},[376,784,785],{"class":455},"remove",[376,787,458],{"class":390},[376,789,407],{"class":386},[376,791,792],{"class":403},"word\u002Fsettings.xml",[376,794,407],{"class":386},[376,796,468],{"class":390},[376,798,612],{"class":386},[376,800,801],{"class":506}," \u002F\u002F true if removed\n",[493,803,805],{"id":804},"save","Save",[367,807,809],{"className":369,"code":808,"language":371,"meta":372,"style":372},"\u002F\u002F Serialize back to ZIP buffer\nconst modified = doc.save();\nwriteFileSync(\"modified.docx\", modified);\n",[345,810,811,816,835],{"__ignoreMap":372},[376,812,813],{"class":378,"line":379},[376,814,815],{"class":506},"\u002F\u002F Serialize back to ZIP buffer\n",[376,817,818,820,823,825,827,829,831,833],{"class":378,"line":413},[376,819,446],{"class":445},[376,821,822],{"class":390}," modified ",[376,824,452],{"class":386},[376,826,519],{"class":390},[376,828,522],{"class":386},[376,830,804],{"class":455},[376,832,639],{"class":390},[376,834,410],{"class":386},[376,836,837,840,842,844,847,849,851,854],{"class":378,"line":435},[376,838,839],{"class":455},"writeFileSync",[376,841,458],{"class":390},[376,843,407],{"class":386},[376,845,846],{"class":403},"modified.docx",[376,848,407],{"class":386},[376,850,728],{"class":386},[376,852,853],{"class":390}," modified)",[376,855,410],{"class":386},[362,857,859],{"id":858},"complete-example","Complete Example",[367,861,863],{"className":369,"code":862,"language":371,"meta":372,"style":372},"import { readFileSync, writeFileSync } from \"node:fs\";\nimport { parseArchive } from \"@office-open\u002Fcore\";\nimport { findChild, children } from \"@office-open\u002Fxml\";\n\nconst doc = parseArchive(readFileSync(\"input.docx\"));\n\n\u002F\u002F Read the main document body\nconst documentXml = doc.get(\"word\u002Fdocument.xml\");\n\n\u002F\u002F List all media files\nconst mediaFiles = doc.keys(\"word\u002Fmedia\u002F\");\nconsole.log(\"Media files:\", mediaFiles);\n\n\u002F\u002F Save a copy\nwriteFileSync(\"output.docx\", doc.save());\n",[345,864,865,890,910,936,940,969,973,978,1005,1009,1014,1041,1067,1072,1078],{"__ignoreMap":372},[376,866,867,869,871,873,875,878,880,882,884,886,888],{"class":378,"line":379},[376,868,383],{"class":382},[376,870,387],{"class":386},[376,872,391],{"class":390},[376,874,728],{"class":386},[376,876,877],{"class":390}," writeFileSync",[376,879,394],{"class":386},[376,881,397],{"class":382},[376,883,400],{"class":386},[376,885,404],{"class":403},[376,887,407],{"class":386},[376,889,410],{"class":386},[376,891,892,894,896,898,900,902,904,906,908],{"class":378,"line":413},[376,893,383],{"class":382},[376,895,387],{"class":386},[376,897,420],{"class":390},[376,899,394],{"class":386},[376,901,397],{"class":382},[376,903,400],{"class":386},[376,905,38],{"class":403},[376,907,407],{"class":386},[376,909,410],{"class":386},[376,911,912,914,916,919,921,924,926,928,930,932,934],{"class":378,"line":435},[376,913,383],{"class":382},[376,915,387],{"class":386},[376,917,918],{"class":390}," findChild",[376,920,728],{"class":386},[376,922,923],{"class":390}," children",[376,925,394],{"class":386},[376,927,397],{"class":382},[376,929,400],{"class":386},[376,931,68],{"class":403},[376,933,407],{"class":386},[376,935,410],{"class":386},[376,937,938],{"class":378,"line":442},[376,939,439],{"emptyLinePlaceholder":438},[376,941,942,944,946,948,950,952,955,957,959,962,964,967],{"class":378,"line":473},[376,943,446],{"class":445},[376,945,478],{"class":390},[376,947,452],{"class":386},[376,949,420],{"class":455},[376,951,458],{"class":390},[376,953,954],{"class":455},"readFileSync",[376,956,458],{"class":390},[376,958,407],{"class":386},[376,960,961],{"class":403},"input.docx",[376,963,407],{"class":386},[376,965,966],{"class":390},"))",[376,968,410],{"class":386},[376,970,971],{"class":378,"line":579},[376,972,439],{"emptyLinePlaceholder":438},[376,974,975],{"class":378,"line":584},[376,976,977],{"class":506},"\u002F\u002F Read the main document body\n",[376,979,980,982,985,987,989,991,993,995,997,999,1001,1003],{"class":378,"line":590},[376,981,446],{"class":445},[376,983,984],{"class":390}," documentXml ",[376,986,452],{"class":386},[376,988,519],{"class":390},[376,990,522],{"class":386},[376,992,525],{"class":455},[376,994,458],{"class":390},[376,996,407],{"class":386},[376,998,605],{"class":403},[376,1000,407],{"class":386},[376,1002,468],{"class":390},[376,1004,410],{"class":386},[376,1006,1007],{"class":378,"line":618},[376,1008,439],{"emptyLinePlaceholder":438},[376,1010,1011],{"class":378,"line":623},[376,1012,1013],{"class":506},"\u002F\u002F List all media files\n",[376,1015,1016,1018,1021,1023,1025,1027,1029,1031,1033,1035,1037,1039],{"class":378,"line":629},[376,1017,446],{"class":445},[376,1019,1020],{"class":390}," mediaFiles ",[376,1022,452],{"class":386},[376,1024,519],{"class":390},[376,1026,522],{"class":386},[376,1028,636],{"class":455},[376,1030,458],{"class":390},[376,1032,407],{"class":386},[376,1034,660],{"class":403},[376,1036,407],{"class":386},[376,1038,468],{"class":390},[376,1040,410],{"class":386},[376,1042,1043,1046,1048,1051,1053,1055,1058,1060,1062,1065],{"class":378,"line":647},[376,1044,1045],{"class":390},"console",[376,1047,522],{"class":386},[376,1049,1050],{"class":455},"log",[376,1052,458],{"class":390},[376,1054,407],{"class":386},[376,1056,1057],{"class":403},"Media files:",[376,1059,407],{"class":386},[376,1061,728],{"class":386},[376,1063,1064],{"class":390}," mediaFiles)",[376,1066,410],{"class":386},[376,1068,1070],{"class":378,"line":1069},13,[376,1071,439],{"emptyLinePlaceholder":438},[376,1073,1075],{"class":378,"line":1074},14,[376,1076,1077],{"class":506},"\u002F\u002F Save a copy\n",[376,1079,1081,1083,1085,1087,1090,1092,1094,1096,1098,1100,1103],{"class":378,"line":1080},15,[376,1082,839],{"class":455},[376,1084,458],{"class":390},[376,1086,407],{"class":386},[376,1088,1089],{"class":403},"output.docx",[376,1091,407],{"class":386},[376,1093,728],{"class":386},[376,1095,519],{"class":390},[376,1097,522],{"class":386},[376,1099,804],{"class":455},[376,1101,1102],{"class":390},"())",[376,1104,410],{"class":386},[362,1106,1108],{"id":1107},"use-with-office-openxml","Use with @office-open\u002Fxml",[341,1110,1111,1112,1114,1115,1117],{},"Combine ",[345,1113,359],{}," with ",[345,1116,68],{}," query utilities to inspect and modify XML content:",[367,1119,1121],{"className":369,"code":1120,"language":371,"meta":372,"style":372},"import { parseArchive } from \"@office-open\u002Fcore\";\nimport { findChild, children, childText } from \"@office-open\u002Fxml\";\n\nconst doc = parseArchive(readFileSync(\"input.docx\"));\nconst body = doc.get(\"word\u002Fdocument.xml\");\n\n\u002F\u002F Find all paragraphs\nconst paragraphs = children(body, \"w:p\");\n\n\u002F\u002F Get text from first paragraph\nconst text = childText(paragraphs[0], \"w:t\");\n",[345,1122,1123,1143,1172,1176,1202,1229,1233,1238,1265,1269,1274],{"__ignoreMap":372},[376,1124,1125,1127,1129,1131,1133,1135,1137,1139,1141],{"class":378,"line":379},[376,1126,383],{"class":382},[376,1128,387],{"class":386},[376,1130,420],{"class":390},[376,1132,394],{"class":386},[376,1134,397],{"class":382},[376,1136,400],{"class":386},[376,1138,38],{"class":403},[376,1140,407],{"class":386},[376,1142,410],{"class":386},[376,1144,1145,1147,1149,1151,1153,1155,1157,1160,1162,1164,1166,1168,1170],{"class":378,"line":413},[376,1146,383],{"class":382},[376,1148,387],{"class":386},[376,1150,918],{"class":390},[376,1152,728],{"class":386},[376,1154,923],{"class":390},[376,1156,728],{"class":386},[376,1158,1159],{"class":390}," childText",[376,1161,394],{"class":386},[376,1163,397],{"class":382},[376,1165,400],{"class":386},[376,1167,68],{"class":403},[376,1169,407],{"class":386},[376,1171,410],{"class":386},[376,1173,1174],{"class":378,"line":435},[376,1175,439],{"emptyLinePlaceholder":438},[376,1177,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198,1200],{"class":378,"line":442},[376,1179,446],{"class":445},[376,1181,478],{"class":390},[376,1183,452],{"class":386},[376,1185,420],{"class":455},[376,1187,458],{"class":390},[376,1189,954],{"class":455},[376,1191,458],{"class":390},[376,1193,407],{"class":386},[376,1195,961],{"class":403},[376,1197,407],{"class":386},[376,1199,966],{"class":390},[376,1201,410],{"class":386},[376,1203,1204,1206,1209,1211,1213,1215,1217,1219,1221,1223,1225,1227],{"class":378,"line":473},[376,1205,446],{"class":445},[376,1207,1208],{"class":390}," body ",[376,1210,452],{"class":386},[376,1212,519],{"class":390},[376,1214,522],{"class":386},[376,1216,525],{"class":455},[376,1218,458],{"class":390},[376,1220,407],{"class":386},[376,1222,605],{"class":403},[376,1224,407],{"class":386},[376,1226,468],{"class":390},[376,1228,410],{"class":386},[376,1230,1231],{"class":378,"line":579},[376,1232,439],{"emptyLinePlaceholder":438},[376,1234,1235],{"class":378,"line":584},[376,1236,1237],{"class":506},"\u002F\u002F Find all paragraphs\n",[376,1239,1240,1242,1245,1247,1249,1252,1254,1256,1259,1261,1263],{"class":378,"line":590},[376,1241,446],{"class":445},[376,1243,1244],{"class":390}," paragraphs ",[376,1246,452],{"class":386},[376,1248,923],{"class":455},[376,1250,1251],{"class":390},"(body",[376,1253,728],{"class":386},[376,1255,400],{"class":386},[376,1257,1258],{"class":403},"w:p",[376,1260,407],{"class":386},[376,1262,468],{"class":390},[376,1264,410],{"class":386},[376,1266,1267],{"class":378,"line":618},[376,1268,439],{"emptyLinePlaceholder":438},[376,1270,1271],{"class":378,"line":623},[376,1272,1273],{"class":506},"\u002F\u002F Get text from first paragraph\n",[376,1275,1276,1278,1281,1283,1285,1288,1292,1295,1297,1299,1302,1304,1306],{"class":378,"line":629},[376,1277,446],{"class":445},[376,1279,1280],{"class":390}," text ",[376,1282,452],{"class":386},[376,1284,1159],{"class":455},[376,1286,1287],{"class":390},"(paragraphs[",[376,1289,1291],{"class":1290},"sbssI","0",[376,1293,1294],{"class":390},"]",[376,1296,728],{"class":386},[376,1298,400],{"class":386},[376,1300,1301],{"class":403},"w:t",[376,1303,407],{"class":386},[376,1305,468],{"class":390},[376,1307,410],{"class":386},[1309,1310,1311],"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 .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 .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 pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":372,"searchDepth":413,"depth":413,"links":1313},[1314,1315,1321,1322],{"id":364,"depth":413,"text":365},{"id":490,"depth":413,"text":491,"children":1316},[1317,1318,1319,1320],{"id":495,"depth":435,"text":496},{"id":672,"depth":435,"text":673},{"id":770,"depth":435,"text":771},{"id":804,"depth":435,"text":805},{"id":858,"depth":413,"text":859},{"id":1107,"depth":413,"text":1108},"Parse and modify existing OOXML documents with ParsedArchive","md",null,{},{"title":58,"description":1323},"rQVJPeMgMh5srQQTYFp8NBupJYk9iSZe2KfaoOolSMw",[1330,1332],{"title":54,"path":55,"stem":56,"description":1331,"children":-1},"Shared chart components for docx and pptx — 12 chart types supported",{"title":68,"path":69,"stem":70,"description":1333,"children":-1},"Zero-dependency XML parsing and serialization library",1787501519321]