[{"data":1,"prerenderedAt":1232},["ShallowReactive",2],{"navigation_docs_en":3,"-en-core-parser":237,"-en-core-parser-surround":1227},[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":50,"body":239,"description":1221,"extension":1222,"links":1223,"meta":1224,"navigation":336,"path":51,"seo":1225,"stem":52,"__hash__":1226},"docs_en\u002Fen\u002F02.core\u002F06.parser.md",{"type":240,"value":241,"toc":1210},"minimark",[242,259,264,386,390,395,568,572,666,670,700,704,754,758,1003,1007,1016,1206],[243,244,245,246,250,251,254,255,258],"p",{},"The parser reads ",[247,248,249],"code",{},".docx"," and ",[247,252,253],{},".pptx"," files into a ",[247,256,257],{},"ParsedDocument"," that provides a key-value store interface for accessing and modifying XML parts.",[260,261,263],"h2",{"id":262},"parse-a-document","Parse a Document",[265,266,271],"pre",{"className":267,"code":268,"language":269,"meta":270,"style":270},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { readFileSync } from \"node:fs\";\nimport { parseDocument } from \"@office-open\u002Fcore\";\n\nconst data = readFileSync(\"document.docx\");\nconst doc = parseDocument(data);\n","ts","",[247,272,273,309,331,338,369],{"__ignoreMap":270},[274,275,278,282,286,290,293,296,299,303,306],"span",{"class":276,"line":277},"line",1,[274,279,281],{"class":280},"s7zQu","import",[274,283,285],{"class":284},"sMK4o"," {",[274,287,289],{"class":288},"sTEyZ"," readFileSync",[274,291,292],{"class":284}," }",[274,294,295],{"class":280}," from",[274,297,298],{"class":284}," \"",[274,300,302],{"class":301},"sfazB","node:fs",[274,304,305],{"class":284},"\"",[274,307,308],{"class":284},";\n",[274,310,312,314,316,319,321,323,325,327,329],{"class":276,"line":311},2,[274,313,281],{"class":280},[274,315,285],{"class":284},[274,317,318],{"class":288}," parseDocument",[274,320,292],{"class":284},[274,322,295],{"class":280},[274,324,298],{"class":284},[274,326,30],{"class":301},[274,328,305],{"class":284},[274,330,308],{"class":284},[274,332,334],{"class":276,"line":333},3,[274,335,337],{"emptyLinePlaceholder":336},true,"\n",[274,339,341,345,348,351,354,357,359,362,364,367],{"class":276,"line":340},4,[274,342,344],{"class":343},"spNyl","const",[274,346,347],{"class":288}," data ",[274,349,350],{"class":284},"=",[274,352,289],{"class":353},"s2Zo4",[274,355,356],{"class":288},"(",[274,358,305],{"class":284},[274,360,361],{"class":301},"document.docx",[274,363,305],{"class":284},[274,365,366],{"class":288},")",[274,368,308],{"class":284},[274,370,372,374,377,379,381,384],{"class":276,"line":371},5,[274,373,344],{"class":343},[274,375,376],{"class":288}," doc ",[274,378,350],{"class":284},[274,380,318],{"class":353},[274,382,383],{"class":288},"(data)",[274,385,308],{"class":284},[260,387,389],{"id":388},"parseddocument-api","ParsedDocument API",[391,392,394],"h3",{"id":393},"read-parts","Read Parts",[265,396,398],{"className":267,"code":397,"language":269,"meta":270,"style":270},"\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",[247,399,400,406,437,441,446,475,480,486,514,519,525,543],{"__ignoreMap":270},[274,401,402],{"class":276,"line":277},[274,403,405],{"class":404},"sHwdD","\u002F\u002F Read an XML part as an Element tree\n",[274,407,408,410,413,415,418,421,424,426,428,431,433,435],{"class":276,"line":311},[274,409,344],{"class":343},[274,411,412],{"class":288}," styles ",[274,414,350],{"class":284},[274,416,417],{"class":288}," doc",[274,419,420],{"class":284},".",[274,422,423],{"class":353},"get",[274,425,356],{"class":288},[274,427,305],{"class":284},[274,429,430],{"class":301},"word\u002Fstyles.xml",[274,432,305],{"class":284},[274,434,366],{"class":288},[274,436,308],{"class":284},[274,438,439],{"class":276,"line":333},[274,440,337],{"emptyLinePlaceholder":336},[274,442,443],{"class":276,"line":340},[274,444,445],{"class":404},"\u002F\u002F Read binary data (images, media)\n",[274,447,448,450,453,455,457,459,462,464,466,469,471,473],{"class":276,"line":371},[274,449,344],{"class":343},[274,451,452],{"class":288}," image ",[274,454,350],{"class":284},[274,456,417],{"class":288},[274,458,420],{"class":284},[274,460,461],{"class":353},"getRaw",[274,463,356],{"class":288},[274,465,305],{"class":284},[274,467,468],{"class":301},"word\u002Fmedia\u002Fimage1.png",[274,470,305],{"class":284},[274,472,366],{"class":288},[274,474,308],{"class":284},[274,476,478],{"class":276,"line":477},6,[274,479,337],{"emptyLinePlaceholder":336},[274,481,483],{"class":276,"line":482},7,[274,484,485],{"class":404},"\u002F\u002F Check if a part exists\n",[274,487,489,492,494,497,499,501,504,506,508,511],{"class":276,"line":488},8,[274,490,491],{"class":288},"doc",[274,493,420],{"class":284},[274,495,496],{"class":353},"has",[274,498,356],{"class":288},[274,500,305],{"class":284},[274,502,503],{"class":301},"word\u002Fdocument.xml",[274,505,305],{"class":284},[274,507,366],{"class":288},[274,509,510],{"class":284},";",[274,512,513],{"class":404}," \u002F\u002F true\n",[274,515,517],{"class":276,"line":516},9,[274,518,337],{"emptyLinePlaceholder":336},[274,520,522],{"class":276,"line":521},10,[274,523,524],{"class":404},"\u002F\u002F List all paths\n",[274,526,528,530,532,535,538,540],{"class":276,"line":527},11,[274,529,491],{"class":288},[274,531,420],{"class":284},[274,533,534],{"class":353},"keys",[274,536,537],{"class":288},"()",[274,539,510],{"class":284},[274,541,542],{"class":404}," \u002F\u002F [\"[Content_Types].xml\", \"word\u002Fdocument.xml\", ...]\n",[274,544,546,548,550,552,554,556,559,561,563,565],{"class":276,"line":545},12,[274,547,491],{"class":288},[274,549,420],{"class":284},[274,551,534],{"class":353},[274,553,356],{"class":288},[274,555,305],{"class":284},[274,557,558],{"class":301},"word\u002Fmedia\u002F",[274,560,305],{"class":284},[274,562,366],{"class":288},[274,564,510],{"class":284},[274,566,567],{"class":404}," \u002F\u002F [\"word\u002Fmedia\u002Fimage1.png\"]\n",[391,569,571],{"id":570},"write-parts","Write Parts",[265,573,575],{"className":267,"code":574,"language":269,"meta":270,"style":270},"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",[247,576,577,598,602,607,632,636,641],{"__ignoreMap":270},[274,578,579,581,583,586,588,590,592,594,596],{"class":276,"line":277},[274,580,281],{"class":280},[274,582,285],{"class":284},[274,584,585],{"class":288}," Element",[274,587,292],{"class":284},[274,589,295],{"class":280},[274,591,298],{"class":284},[274,593,68],{"class":301},[274,595,305],{"class":284},[274,597,308],{"class":284},[274,599,600],{"class":276,"line":311},[274,601,337],{"emptyLinePlaceholder":336},[274,603,604],{"class":276,"line":333},[274,605,606],{"class":404},"\u002F\u002F Write an XML part\n",[274,608,609,611,613,616,618,620,622,624,627,630],{"class":276,"line":340},[274,610,491],{"class":288},[274,612,420],{"class":284},[274,614,615],{"class":353},"set",[274,617,356],{"class":288},[274,619,305],{"class":284},[274,621,430],{"class":301},[274,623,305],{"class":284},[274,625,626],{"class":284},",",[274,628,629],{"class":288}," modifiedStylesElement)",[274,631,308],{"class":284},[274,633,634],{"class":276,"line":371},[274,635,337],{"emptyLinePlaceholder":336},[274,637,638],{"class":276,"line":477},[274,639,640],{"class":404},"\u002F\u002F Write binary data\n",[274,642,643,645,647,650,652,654,657,659,661,664],{"class":276,"line":482},[274,644,491],{"class":288},[274,646,420],{"class":284},[274,648,649],{"class":353},"setRaw",[274,651,356],{"class":288},[274,653,305],{"class":284},[274,655,656],{"class":301},"word\u002Fmedia\u002Fimage2.png",[274,658,305],{"class":284},[274,660,626],{"class":284},[274,662,663],{"class":288}," imageBuffer)",[274,665,308],{"class":284},[391,667,669],{"id":668},"remove-parts","Remove Parts",[265,671,673],{"className":267,"code":672,"language":269,"meta":270,"style":270},"doc.remove(\"word\u002Fsettings.xml\"); \u002F\u002F true if removed\n",[247,674,675],{"__ignoreMap":270},[274,676,677,679,681,684,686,688,691,693,695,697],{"class":276,"line":277},[274,678,491],{"class":288},[274,680,420],{"class":284},[274,682,683],{"class":353},"remove",[274,685,356],{"class":288},[274,687,305],{"class":284},[274,689,690],{"class":301},"word\u002Fsettings.xml",[274,692,305],{"class":284},[274,694,366],{"class":288},[274,696,510],{"class":284},[274,698,699],{"class":404}," \u002F\u002F true if removed\n",[391,701,703],{"id":702},"save","Save",[265,705,707],{"className":267,"code":706,"language":269,"meta":270,"style":270},"\u002F\u002F Serialize back to ZIP buffer\nconst modified = doc.save();\nwriteFileSync(\"modified.docx\", modified);\n",[247,708,709,714,733],{"__ignoreMap":270},[274,710,711],{"class":276,"line":277},[274,712,713],{"class":404},"\u002F\u002F Serialize back to ZIP buffer\n",[274,715,716,718,721,723,725,727,729,731],{"class":276,"line":311},[274,717,344],{"class":343},[274,719,720],{"class":288}," modified ",[274,722,350],{"class":284},[274,724,417],{"class":288},[274,726,420],{"class":284},[274,728,702],{"class":353},[274,730,537],{"class":288},[274,732,308],{"class":284},[274,734,735,738,740,742,745,747,749,752],{"class":276,"line":333},[274,736,737],{"class":353},"writeFileSync",[274,739,356],{"class":288},[274,741,305],{"class":284},[274,743,744],{"class":301},"modified.docx",[274,746,305],{"class":284},[274,748,626],{"class":284},[274,750,751],{"class":288}," modified)",[274,753,308],{"class":284},[260,755,757],{"id":756},"complete-example","Complete Example",[265,759,761],{"className":267,"code":760,"language":269,"meta":270,"style":270},"import { readFileSync, writeFileSync } from \"node:fs\";\nimport { parseDocument } from \"@office-open\u002Fcore\";\nimport { findChild, children } from \"@office-open\u002Fxml\";\n\nconst doc = parseDocument(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",[247,762,763,788,808,834,838,867,871,876,903,907,912,939,965,970,976],{"__ignoreMap":270},[274,764,765,767,769,771,773,776,778,780,782,784,786],{"class":276,"line":277},[274,766,281],{"class":280},[274,768,285],{"class":284},[274,770,289],{"class":288},[274,772,626],{"class":284},[274,774,775],{"class":288}," writeFileSync",[274,777,292],{"class":284},[274,779,295],{"class":280},[274,781,298],{"class":284},[274,783,302],{"class":301},[274,785,305],{"class":284},[274,787,308],{"class":284},[274,789,790,792,794,796,798,800,802,804,806],{"class":276,"line":311},[274,791,281],{"class":280},[274,793,285],{"class":284},[274,795,318],{"class":288},[274,797,292],{"class":284},[274,799,295],{"class":280},[274,801,298],{"class":284},[274,803,30],{"class":301},[274,805,305],{"class":284},[274,807,308],{"class":284},[274,809,810,812,814,817,819,822,824,826,828,830,832],{"class":276,"line":333},[274,811,281],{"class":280},[274,813,285],{"class":284},[274,815,816],{"class":288}," findChild",[274,818,626],{"class":284},[274,820,821],{"class":288}," children",[274,823,292],{"class":284},[274,825,295],{"class":280},[274,827,298],{"class":284},[274,829,68],{"class":301},[274,831,305],{"class":284},[274,833,308],{"class":284},[274,835,836],{"class":276,"line":340},[274,837,337],{"emptyLinePlaceholder":336},[274,839,840,842,844,846,848,850,853,855,857,860,862,865],{"class":276,"line":371},[274,841,344],{"class":343},[274,843,376],{"class":288},[274,845,350],{"class":284},[274,847,318],{"class":353},[274,849,356],{"class":288},[274,851,852],{"class":353},"readFileSync",[274,854,356],{"class":288},[274,856,305],{"class":284},[274,858,859],{"class":301},"input.docx",[274,861,305],{"class":284},[274,863,864],{"class":288},"))",[274,866,308],{"class":284},[274,868,869],{"class":276,"line":477},[274,870,337],{"emptyLinePlaceholder":336},[274,872,873],{"class":276,"line":482},[274,874,875],{"class":404},"\u002F\u002F Read the main document body\n",[274,877,878,880,883,885,887,889,891,893,895,897,899,901],{"class":276,"line":488},[274,879,344],{"class":343},[274,881,882],{"class":288}," documentXml ",[274,884,350],{"class":284},[274,886,417],{"class":288},[274,888,420],{"class":284},[274,890,423],{"class":353},[274,892,356],{"class":288},[274,894,305],{"class":284},[274,896,503],{"class":301},[274,898,305],{"class":284},[274,900,366],{"class":288},[274,902,308],{"class":284},[274,904,905],{"class":276,"line":516},[274,906,337],{"emptyLinePlaceholder":336},[274,908,909],{"class":276,"line":521},[274,910,911],{"class":404},"\u002F\u002F List all media files\n",[274,913,914,916,919,921,923,925,927,929,931,933,935,937],{"class":276,"line":527},[274,915,344],{"class":343},[274,917,918],{"class":288}," mediaFiles ",[274,920,350],{"class":284},[274,922,417],{"class":288},[274,924,420],{"class":284},[274,926,534],{"class":353},[274,928,356],{"class":288},[274,930,305],{"class":284},[274,932,558],{"class":301},[274,934,305],{"class":284},[274,936,366],{"class":288},[274,938,308],{"class":284},[274,940,941,944,946,949,951,953,956,958,960,963],{"class":276,"line":545},[274,942,943],{"class":288},"console",[274,945,420],{"class":284},[274,947,948],{"class":353},"log",[274,950,356],{"class":288},[274,952,305],{"class":284},[274,954,955],{"class":301},"Media files:",[274,957,305],{"class":284},[274,959,626],{"class":284},[274,961,962],{"class":288}," mediaFiles)",[274,964,308],{"class":284},[274,966,968],{"class":276,"line":967},13,[274,969,337],{"emptyLinePlaceholder":336},[274,971,973],{"class":276,"line":972},14,[274,974,975],{"class":404},"\u002F\u002F Save a copy\n",[274,977,979,981,983,985,988,990,992,994,996,998,1001],{"class":276,"line":978},15,[274,980,737],{"class":353},[274,982,356],{"class":288},[274,984,305],{"class":284},[274,986,987],{"class":301},"output.docx",[274,989,305],{"class":284},[274,991,626],{"class":284},[274,993,417],{"class":288},[274,995,420],{"class":284},[274,997,702],{"class":353},[274,999,1000],{"class":288},"())",[274,1002,308],{"class":284},[260,1004,1006],{"id":1005},"use-with-office-openxml","Use with @office-open\u002Fxml",[243,1008,1009,1010,1012,1013,1015],{},"Combine ",[247,1011,257],{}," with ",[247,1014,68],{}," query utilities to inspect and modify XML content:",[265,1017,1019],{"className":267,"code":1018,"language":269,"meta":270,"style":270},"import { parseDocument } from \"@office-open\u002Fcore\";\nimport { findChild, children, childText } from \"@office-open\u002Fxml\";\n\nconst doc = parseDocument(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",[247,1020,1021,1041,1070,1074,1100,1127,1131,1136,1163,1167,1172],{"__ignoreMap":270},[274,1022,1023,1025,1027,1029,1031,1033,1035,1037,1039],{"class":276,"line":277},[274,1024,281],{"class":280},[274,1026,285],{"class":284},[274,1028,318],{"class":288},[274,1030,292],{"class":284},[274,1032,295],{"class":280},[274,1034,298],{"class":284},[274,1036,30],{"class":301},[274,1038,305],{"class":284},[274,1040,308],{"class":284},[274,1042,1043,1045,1047,1049,1051,1053,1055,1058,1060,1062,1064,1066,1068],{"class":276,"line":311},[274,1044,281],{"class":280},[274,1046,285],{"class":284},[274,1048,816],{"class":288},[274,1050,626],{"class":284},[274,1052,821],{"class":288},[274,1054,626],{"class":284},[274,1056,1057],{"class":288}," childText",[274,1059,292],{"class":284},[274,1061,295],{"class":280},[274,1063,298],{"class":284},[274,1065,68],{"class":301},[274,1067,305],{"class":284},[274,1069,308],{"class":284},[274,1071,1072],{"class":276,"line":333},[274,1073,337],{"emptyLinePlaceholder":336},[274,1075,1076,1078,1080,1082,1084,1086,1088,1090,1092,1094,1096,1098],{"class":276,"line":340},[274,1077,344],{"class":343},[274,1079,376],{"class":288},[274,1081,350],{"class":284},[274,1083,318],{"class":353},[274,1085,356],{"class":288},[274,1087,852],{"class":353},[274,1089,356],{"class":288},[274,1091,305],{"class":284},[274,1093,859],{"class":301},[274,1095,305],{"class":284},[274,1097,864],{"class":288},[274,1099,308],{"class":284},[274,1101,1102,1104,1107,1109,1111,1113,1115,1117,1119,1121,1123,1125],{"class":276,"line":371},[274,1103,344],{"class":343},[274,1105,1106],{"class":288}," body ",[274,1108,350],{"class":284},[274,1110,417],{"class":288},[274,1112,420],{"class":284},[274,1114,423],{"class":353},[274,1116,356],{"class":288},[274,1118,305],{"class":284},[274,1120,503],{"class":301},[274,1122,305],{"class":284},[274,1124,366],{"class":288},[274,1126,308],{"class":284},[274,1128,1129],{"class":276,"line":477},[274,1130,337],{"emptyLinePlaceholder":336},[274,1132,1133],{"class":276,"line":482},[274,1134,1135],{"class":404},"\u002F\u002F Find all paragraphs\n",[274,1137,1138,1140,1143,1145,1147,1150,1152,1154,1157,1159,1161],{"class":276,"line":488},[274,1139,344],{"class":343},[274,1141,1142],{"class":288}," paragraphs ",[274,1144,350],{"class":284},[274,1146,821],{"class":353},[274,1148,1149],{"class":288},"(body",[274,1151,626],{"class":284},[274,1153,298],{"class":284},[274,1155,1156],{"class":301},"w:p",[274,1158,305],{"class":284},[274,1160,366],{"class":288},[274,1162,308],{"class":284},[274,1164,1165],{"class":276,"line":516},[274,1166,337],{"emptyLinePlaceholder":336},[274,1168,1169],{"class":276,"line":521},[274,1170,1171],{"class":404},"\u002F\u002F Get text from first paragraph\n",[274,1173,1174,1176,1179,1181,1183,1186,1190,1193,1195,1197,1200,1202,1204],{"class":276,"line":527},[274,1175,344],{"class":343},[274,1177,1178],{"class":288}," text ",[274,1180,350],{"class":284},[274,1182,1057],{"class":353},[274,1184,1185],{"class":288},"(paragraphs[",[274,1187,1189],{"class":1188},"sbssI","0",[274,1191,1192],{"class":288},"]",[274,1194,626],{"class":284},[274,1196,298],{"class":284},[274,1198,1199],{"class":301},"w:t",[274,1201,305],{"class":284},[274,1203,366],{"class":288},[274,1205,308],{"class":284},[1207,1208,1209],"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":270,"searchDepth":311,"depth":311,"links":1211},[1212,1213,1219,1220],{"id":262,"depth":311,"text":263},{"id":388,"depth":311,"text":389,"children":1214},[1215,1216,1217,1218],{"id":393,"depth":333,"text":394},{"id":570,"depth":333,"text":571},{"id":668,"depth":333,"text":669},{"id":702,"depth":333,"text":703},{"id":756,"depth":311,"text":757},{"id":1005,"depth":311,"text":1006},"Parse and modify existing OOXML documents with ParsedDocument","md",null,{},{"title":50,"description":1221},"gMR-beHkxweBji6G7ZYNqg9Y2norQ3TQK_OSLQWmywk",[1228,1230],{"title":46,"path":47,"stem":48,"description":1229,"children":-1},"Convert XmlComponent trees to serializable XML objects and strings",{"title":54,"path":55,"stem":56,"description":1231,"children":-1},"Read and write OOXML ZIP archives, parse relationships",1778862994501]