[{"data":1,"prerenderedAt":1442},["ShallowReactive",2],{"navigation_docs_en":3,"-en-xml-query-utilities":237,"-en-xml-query-utilities-surround":1437},[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":80,"body":239,"description":1431,"extension":1432,"links":1433,"meta":1434,"navigation":323,"path":81,"seo":1435,"stem":82,"__hash__":1436},"docs_en\u002Fen\u002F03.xml\u002F04.query-utilities.md",{"type":240,"value":241,"toc":1407},"minimark",[242,255,260,265,268,384,387,390,477,481,484,530,534,538,541,630,634,637,710,714,717,766,770,773,776,885,889,892,918,922,925,952,956,959,1011,1015,1019,1022,1075,1079,1082,1138,1142,1145,1186,1190,1403],[243,244,245,246,250,251,254],"p",{},"After parsing XML with ",[247,248,249],"code",{},"parse()",", use these utilities to traverse and extract data from the ",[247,252,253],{},"Element"," tree.",[256,257,259],"h2",{"id":258},"finding-children","Finding Children",[261,262,264],"h3",{"id":263},"findchild","findChild",[243,266,267],{},"Find the first direct child by tag name:",[269,270,275],"pre",{"className":271,"code":272,"language":273,"meta":274,"style":274},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { parse, findChild } from \"@office-open\u002Fxml\";\n\nconst root = parse(\"\u003Cw:p>\u003Cw:r>\u003Cw:t>Hello\u003C\u002Fw:t>\u003C\u002Fw:r>\u003C\u002Fw:p>\");\nconst run = findChild(root, \"w:r\");\n","ts","",[247,276,277,318,325,356],{"__ignoreMap":274},[278,279,282,286,290,294,297,300,303,306,309,312,315],"span",{"class":280,"line":281},"line",1,[278,283,285],{"class":284},"s7zQu","import",[278,287,289],{"class":288},"sMK4o"," {",[278,291,293],{"class":292},"sTEyZ"," parse",[278,295,296],{"class":288},",",[278,298,299],{"class":292}," findChild",[278,301,302],{"class":288}," }",[278,304,305],{"class":284}," from",[278,307,308],{"class":288}," \"",[278,310,68],{"class":311},"sfazB",[278,313,314],{"class":288},"\"",[278,316,317],{"class":288},";\n",[278,319,321],{"class":280,"line":320},2,[278,322,324],{"emptyLinePlaceholder":323},true,"\n",[278,326,328,332,335,338,341,344,346,349,351,354],{"class":280,"line":327},3,[278,329,331],{"class":330},"spNyl","const",[278,333,334],{"class":292}," root ",[278,336,337],{"class":288},"=",[278,339,293],{"class":340},"s2Zo4",[278,342,343],{"class":292},"(",[278,345,314],{"class":288},[278,347,348],{"class":311},"\u003Cw:p>\u003Cw:r>\u003Cw:t>Hello\u003C\u002Fw:t>\u003C\u002Fw:r>\u003C\u002Fw:p>",[278,350,314],{"class":288},[278,352,353],{"class":292},")",[278,355,317],{"class":288},[278,357,359,361,364,366,368,371,373,375,378,380,382],{"class":280,"line":358},4,[278,360,331],{"class":330},[278,362,363],{"class":292}," run ",[278,365,337],{"class":288},[278,367,299],{"class":340},[278,369,370],{"class":292},"(root",[278,372,296],{"class":288},[278,374,308],{"class":288},[278,376,377],{"class":311},"w:r",[278,379,314],{"class":288},[278,381,353],{"class":292},[278,383,317],{"class":288},[261,385,386],{"id":386},"children",[243,388,389],{},"Get all direct children matching a tag name:",[269,391,393],{"className":271,"code":392,"language":273,"meta":274,"style":274},"import { parse, children } from \"@office-open\u002Fxml\";\n\nconst root = parse(\"\u003Cw:p>\u003Cw:r\u002F>\u003Cw:r\u002F>\u003Cw:r\u002F>\u003C\u002Fw:p>\");\nconst runs = children(root, \"w:r\"); \u002F\u002F 3 elements\n",[247,394,395,420,424,447],{"__ignoreMap":274},[278,396,397,399,401,403,405,408,410,412,414,416,418],{"class":280,"line":281},[278,398,285],{"class":284},[278,400,289],{"class":288},[278,402,293],{"class":292},[278,404,296],{"class":288},[278,406,407],{"class":292}," children",[278,409,302],{"class":288},[278,411,305],{"class":284},[278,413,308],{"class":288},[278,415,68],{"class":311},[278,417,314],{"class":288},[278,419,317],{"class":288},[278,421,422],{"class":280,"line":320},[278,423,324],{"emptyLinePlaceholder":323},[278,425,426,428,430,432,434,436,438,441,443,445],{"class":280,"line":327},[278,427,331],{"class":330},[278,429,334],{"class":292},[278,431,337],{"class":288},[278,433,293],{"class":340},[278,435,343],{"class":292},[278,437,314],{"class":288},[278,439,440],{"class":311},"\u003Cw:p>\u003Cw:r\u002F>\u003Cw:r\u002F>\u003Cw:r\u002F>\u003C\u002Fw:p>",[278,442,314],{"class":288},[278,444,353],{"class":292},[278,446,317],{"class":288},[278,448,449,451,454,456,458,460,462,464,466,468,470,473],{"class":280,"line":358},[278,450,331],{"class":330},[278,452,453],{"class":292}," runs ",[278,455,337],{"class":288},[278,457,407],{"class":340},[278,459,370],{"class":292},[278,461,296],{"class":288},[278,463,308],{"class":288},[278,465,377],{"class":311},[278,467,314],{"class":288},[278,469,353],{"class":292},[278,471,472],{"class":288},";",[278,474,476],{"class":475},"sHwdD"," \u002F\u002F 3 elements\n",[261,478,480],{"id":479},"allchildren","allChildren",[243,482,483],{},"Get all direct children regardless of tag name:",[269,485,487],{"className":271,"code":486,"language":273,"meta":274,"style":274},"import { allChildren } from \"@office-open\u002Fxml\";\n\nconst all = allChildren(root);\n",[247,488,489,510,514],{"__ignoreMap":274},[278,490,491,493,495,498,500,502,504,506,508],{"class":280,"line":281},[278,492,285],{"class":284},[278,494,289],{"class":288},[278,496,497],{"class":292}," allChildren",[278,499,302],{"class":288},[278,501,305],{"class":284},[278,503,308],{"class":288},[278,505,68],{"class":311},[278,507,314],{"class":288},[278,509,317],{"class":288},[278,511,512],{"class":280,"line":320},[278,513,324],{"emptyLinePlaceholder":323},[278,515,516,518,521,523,525,528],{"class":280,"line":327},[278,517,331],{"class":330},[278,519,520],{"class":292}," all ",[278,522,337],{"class":288},[278,524,497],{"class":340},[278,526,527],{"class":292},"(root)",[278,529,317],{"class":288},[256,531,533],{"id":532},"reading-text","Reading Text",[261,535,537],{"id":536},"childtext","childText",[243,539,540],{},"Get text content of the first matching child:",[269,542,544],{"className":271,"code":543,"language":273,"meta":274,"style":274},"import { parse, findChild, childText } from \"@office-open\u002Fxml\";\n\nconst root = parse(\"\u003Cw:p>\u003Cw:r>\u003Cw:t>Hello\u003C\u002Fw:t>\u003C\u002Fw:r>\u003C\u002Fw:p>\");\nconst text = childText(root, \"w:t\"); \u002F\u002F \"Hello\"\n",[247,545,546,575,579,601],{"__ignoreMap":274},[278,547,548,550,552,554,556,558,560,563,565,567,569,571,573],{"class":280,"line":281},[278,549,285],{"class":284},[278,551,289],{"class":288},[278,553,293],{"class":292},[278,555,296],{"class":288},[278,557,299],{"class":292},[278,559,296],{"class":288},[278,561,562],{"class":292}," childText",[278,564,302],{"class":288},[278,566,305],{"class":284},[278,568,308],{"class":288},[278,570,68],{"class":311},[278,572,314],{"class":288},[278,574,317],{"class":288},[278,576,577],{"class":280,"line":320},[278,578,324],{"emptyLinePlaceholder":323},[278,580,581,583,585,587,589,591,593,595,597,599],{"class":280,"line":327},[278,582,331],{"class":330},[278,584,334],{"class":292},[278,586,337],{"class":288},[278,588,293],{"class":340},[278,590,343],{"class":292},[278,592,314],{"class":288},[278,594,348],{"class":311},[278,596,314],{"class":288},[278,598,353],{"class":292},[278,600,317],{"class":288},[278,602,603,605,608,610,612,614,616,618,621,623,625,627],{"class":280,"line":358},[278,604,331],{"class":330},[278,606,607],{"class":292}," text ",[278,609,337],{"class":288},[278,611,562],{"class":340},[278,613,370],{"class":292},[278,615,296],{"class":288},[278,617,308],{"class":288},[278,619,620],{"class":311},"w:t",[278,622,314],{"class":288},[278,624,353],{"class":292},[278,626,472],{"class":288},[278,628,629],{"class":475}," \u002F\u002F \"Hello\"\n",[261,631,633],{"id":632},"textof","textOf",[243,635,636],{},"Get text content of an element itself:",[269,638,640],{"className":271,"code":639,"language":273,"meta":274,"style":274},"import { textOf } from \"@office-open\u002Fxml\";\n\nconst textEl = findChild(run, \"w:t\");\nconst text = textOf(textEl); \u002F\u002F \"Hello\"\n",[247,641,642,663,667,693],{"__ignoreMap":274},[278,643,644,646,648,651,653,655,657,659,661],{"class":280,"line":281},[278,645,285],{"class":284},[278,647,289],{"class":288},[278,649,650],{"class":292}," textOf",[278,652,302],{"class":288},[278,654,305],{"class":284},[278,656,308],{"class":288},[278,658,68],{"class":311},[278,660,314],{"class":288},[278,662,317],{"class":288},[278,664,665],{"class":280,"line":320},[278,666,324],{"emptyLinePlaceholder":323},[278,668,669,671,674,676,678,681,683,685,687,689,691],{"class":280,"line":327},[278,670,331],{"class":330},[278,672,673],{"class":292}," textEl ",[278,675,337],{"class":288},[278,677,299],{"class":340},[278,679,680],{"class":292},"(run",[278,682,296],{"class":288},[278,684,308],{"class":288},[278,686,620],{"class":311},[278,688,314],{"class":288},[278,690,353],{"class":292},[278,692,317],{"class":288},[278,694,695,697,699,701,703,706,708],{"class":280,"line":358},[278,696,331],{"class":330},[278,698,607],{"class":292},[278,700,337],{"class":288},[278,702,650],{"class":340},[278,704,705],{"class":292},"(textEl)",[278,707,472],{"class":288},[278,709,629],{"class":475},[261,711,713],{"id":712},"collecttext","collectText",[243,715,716],{},"Collect text from all text nodes in an element and its descendants:",[269,718,720],{"className":271,"code":719,"language":273,"meta":274,"style":274},"import { collectText } from \"@office-open\u002Fxml\";\n\nconst allText = collectText(paragraph); \u002F\u002F Concatenated text content\n",[247,721,722,743,747],{"__ignoreMap":274},[278,723,724,726,728,731,733,735,737,739,741],{"class":280,"line":281},[278,725,285],{"class":284},[278,727,289],{"class":288},[278,729,730],{"class":292}," collectText",[278,732,302],{"class":288},[278,734,305],{"class":284},[278,736,308],{"class":288},[278,738,68],{"class":311},[278,740,314],{"class":288},[278,742,317],{"class":288},[278,744,745],{"class":280,"line":320},[278,746,324],{"emptyLinePlaceholder":323},[278,748,749,751,754,756,758,761,763],{"class":280,"line":327},[278,750,331],{"class":330},[278,752,753],{"class":292}," allText ",[278,755,337],{"class":288},[278,757,730],{"class":340},[278,759,760],{"class":292},"(paragraph)",[278,762,472],{"class":288},[278,764,765],{"class":475}," \u002F\u002F Concatenated text content\n",[256,767,769],{"id":768},"reading-attributes","Reading Attributes",[261,771,772],{"id":772},"attr",[243,774,775],{},"Get attribute value as string:",[269,777,779],{"className":271,"code":778,"language":273,"meta":274,"style":274},"import { parse, findChild, attr } from \"@office-open\u002Fxml\";\n\nconst element = parse('\u003Cw:spacing w:before=\"240\" w:after=\"120\"\u002F>');\nattr(element, \"w:before\"); \u002F\u002F \"240\"\nattr(element, \"w:after\"); \u002F\u002F \"120\"\n",[247,780,781,810,814,839,862],{"__ignoreMap":274},[278,782,783,785,787,789,791,793,795,798,800,802,804,806,808],{"class":280,"line":281},[278,784,285],{"class":284},[278,786,289],{"class":288},[278,788,293],{"class":292},[278,790,296],{"class":288},[278,792,299],{"class":292},[278,794,296],{"class":288},[278,796,797],{"class":292}," attr",[278,799,302],{"class":288},[278,801,305],{"class":284},[278,803,308],{"class":288},[278,805,68],{"class":311},[278,807,314],{"class":288},[278,809,317],{"class":288},[278,811,812],{"class":280,"line":320},[278,813,324],{"emptyLinePlaceholder":323},[278,815,816,818,821,823,825,827,830,833,835,837],{"class":280,"line":327},[278,817,331],{"class":330},[278,819,820],{"class":292}," element ",[278,822,337],{"class":288},[278,824,293],{"class":340},[278,826,343],{"class":292},[278,828,829],{"class":288},"'",[278,831,832],{"class":311},"\u003Cw:spacing w:before=\"240\" w:after=\"120\"\u002F>",[278,834,829],{"class":288},[278,836,353],{"class":292},[278,838,317],{"class":288},[278,840,841,843,846,848,850,853,855,857,859],{"class":280,"line":358},[278,842,772],{"class":340},[278,844,845],{"class":292},"(element",[278,847,296],{"class":288},[278,849,308],{"class":288},[278,851,852],{"class":311},"w:before",[278,854,314],{"class":288},[278,856,353],{"class":292},[278,858,472],{"class":288},[278,860,861],{"class":475}," \u002F\u002F \"240\"\n",[278,863,865,867,869,871,873,876,878,880,882],{"class":280,"line":864},5,[278,866,772],{"class":340},[278,868,845],{"class":292},[278,870,296],{"class":288},[278,872,308],{"class":288},[278,874,875],{"class":311},"w:after",[278,877,314],{"class":288},[278,879,353],{"class":292},[278,881,472],{"class":288},[278,883,884],{"class":475}," \u002F\u002F \"120\"\n",[261,886,888],{"id":887},"attrnum","attrNum",[243,890,891],{},"Get attribute value as number:",[269,893,895],{"className":271,"code":894,"language":273,"meta":274,"style":274},"attrNum(element, \"w:before\"); \u002F\u002F 240\n",[247,896,897],{"__ignoreMap":274},[278,898,899,901,903,905,907,909,911,913,915],{"class":280,"line":281},[278,900,888],{"class":340},[278,902,845],{"class":292},[278,904,296],{"class":288},[278,906,308],{"class":288},[278,908,852],{"class":311},[278,910,314],{"class":288},[278,912,353],{"class":292},[278,914,472],{"class":288},[278,916,917],{"class":475}," \u002F\u002F 240\n",[261,919,921],{"id":920},"attrbool","attrBool",[243,923,924],{},"Get attribute value as boolean:",[269,926,928],{"className":271,"code":927,"language":273,"meta":274,"style":274},"attrBool(element, \"w:val\"); \u002F\u002F true or false based on \"true\"\u002F\"1\"\u002F\"false\"\u002F\"0\"\n",[247,929,930],{"__ignoreMap":274},[278,931,932,934,936,938,940,943,945,947,949],{"class":280,"line":281},[278,933,921],{"class":340},[278,935,845],{"class":292},[278,937,296],{"class":288},[278,939,308],{"class":288},[278,941,942],{"class":311},"w:val",[278,944,314],{"class":288},[278,946,353],{"class":292},[278,948,472],{"class":288},[278,950,951],{"class":475}," \u002F\u002F true or false based on \"true\"\u002F\"1\"\u002F\"false\"\u002F\"0\"\n",[261,953,955],{"id":954},"colorattr","colorAttr",[243,957,958],{},"Get hex color attribute with normalization:",[269,960,962],{"className":271,"code":961,"language":273,"meta":274,"style":274},"import { colorAttr } from \"@office-open\u002Fxml\";\n\ncolorAttr(element, \"w:color\"); \u002F\u002F \"FF0000\"\n",[247,963,964,985,989],{"__ignoreMap":274},[278,965,966,968,970,973,975,977,979,981,983],{"class":280,"line":281},[278,967,285],{"class":284},[278,969,289],{"class":288},[278,971,972],{"class":292}," colorAttr",[278,974,302],{"class":288},[278,976,305],{"class":284},[278,978,308],{"class":288},[278,980,68],{"class":311},[278,982,314],{"class":288},[278,984,317],{"class":288},[278,986,987],{"class":280,"line":320},[278,988,324],{"emptyLinePlaceholder":323},[278,990,991,993,995,997,999,1002,1004,1006,1008],{"class":280,"line":327},[278,992,955],{"class":340},[278,994,845],{"class":292},[278,996,296],{"class":288},[278,998,308],{"class":288},[278,1000,1001],{"class":311},"w:color",[278,1003,314],{"class":288},[278,1005,353],{"class":292},[278,1007,472],{"class":288},[278,1009,1010],{"class":475}," \u002F\u002F \"FF0000\"\n",[256,1012,1014],{"id":1013},"checking-structure","Checking Structure",[261,1016,1018],{"id":1017},"haschild","hasChild",[243,1020,1021],{},"Check if an element has a specific child:",[269,1023,1025],{"className":271,"code":1024,"language":273,"meta":274,"style":274},"import { hasChild } from \"@office-open\u002Fxml\";\n\nhasChild(paragraph, \"w:pPr\"); \u002F\u002F true or false\n",[247,1026,1027,1048,1052],{"__ignoreMap":274},[278,1028,1029,1031,1033,1036,1038,1040,1042,1044,1046],{"class":280,"line":281},[278,1030,285],{"class":284},[278,1032,289],{"class":288},[278,1034,1035],{"class":292}," hasChild",[278,1037,302],{"class":288},[278,1039,305],{"class":284},[278,1041,308],{"class":288},[278,1043,68],{"class":311},[278,1045,314],{"class":288},[278,1047,317],{"class":288},[278,1049,1050],{"class":280,"line":320},[278,1051,324],{"emptyLinePlaceholder":323},[278,1053,1054,1056,1059,1061,1063,1066,1068,1070,1072],{"class":280,"line":327},[278,1055,1018],{"class":340},[278,1057,1058],{"class":292},"(paragraph",[278,1060,296],{"class":288},[278,1062,308],{"class":288},[278,1064,1065],{"class":311},"w:pPr",[278,1067,314],{"class":288},[278,1069,353],{"class":292},[278,1071,472],{"class":288},[278,1073,1074],{"class":475}," \u002F\u002F true or false\n",[261,1076,1078],{"id":1077},"finddeep","findDeep",[243,1080,1081],{},"Find all descendant elements matching a tag name:",[269,1083,1085],{"className":271,"code":1084,"language":273,"meta":274,"style":274},"import { findDeep } from \"@office-open\u002Fxml\";\n\nconst allTextNodes = findDeep(document, \"w:t\");\n",[247,1086,1087,1108,1112],{"__ignoreMap":274},[278,1088,1089,1091,1093,1096,1098,1100,1102,1104,1106],{"class":280,"line":281},[278,1090,285],{"class":284},[278,1092,289],{"class":288},[278,1094,1095],{"class":292}," findDeep",[278,1097,302],{"class":288},[278,1099,305],{"class":284},[278,1101,308],{"class":288},[278,1103,68],{"class":311},[278,1105,314],{"class":288},[278,1107,317],{"class":288},[278,1109,1110],{"class":280,"line":320},[278,1111,324],{"emptyLinePlaceholder":323},[278,1113,1114,1116,1119,1121,1123,1126,1128,1130,1132,1134,1136],{"class":280,"line":327},[278,1115,331],{"class":330},[278,1117,1118],{"class":292}," allTextNodes ",[278,1120,337],{"class":288},[278,1122,1095],{"class":340},[278,1124,1125],{"class":292},"(document",[278,1127,296],{"class":288},[278,1129,308],{"class":288},[278,1131,620],{"class":311},[278,1133,314],{"class":288},[278,1135,353],{"class":292},[278,1137,317],{"class":288},[261,1139,1141],{"id":1140},"childcount","childCount",[243,1143,1144],{},"Get the number of direct child elements:",[269,1146,1148],{"className":271,"code":1147,"language":273,"meta":274,"style":274},"import { childCount } from \"@office-open\u002Fxml\";\n\nchildCount(paragraph); \u002F\u002F 3\n",[247,1149,1150,1171,1175],{"__ignoreMap":274},[278,1151,1152,1154,1156,1159,1161,1163,1165,1167,1169],{"class":280,"line":281},[278,1153,285],{"class":284},[278,1155,289],{"class":288},[278,1157,1158],{"class":292}," childCount",[278,1160,302],{"class":288},[278,1162,305],{"class":284},[278,1164,308],{"class":288},[278,1166,68],{"class":311},[278,1168,314],{"class":288},[278,1170,317],{"class":288},[278,1172,1173],{"class":280,"line":320},[278,1174,324],{"emptyLinePlaceholder":323},[278,1176,1177,1179,1181,1183],{"class":280,"line":327},[278,1178,1141],{"class":340},[278,1180,760],{"class":292},[278,1182,472],{"class":288},[278,1184,1185],{"class":475}," \u002F\u002F 3\n",[256,1187,1189],{"id":1188},"complete-reference","Complete Reference",[1191,1192,1193,1209],"table",{},[1194,1195,1196],"thead",{},[1197,1198,1199,1203,1206],"tr",{},[1200,1201,1202],"th",{},"Function",[1200,1204,1205],{},"Returns",[1200,1207,1208],{},"Description",[1210,1211,1212,1228,1243,1257,1272,1286,1300,1315,1330,1345,1359,1374,1388],"tbody",{},[1197,1213,1214,1220,1225],{},[1215,1216,1217],"td",{},[247,1218,1219],{},"findChild(parent, name)",[1215,1221,1222],{},[247,1223,1224],{},"Element | undefined",[1215,1226,1227],{},"First direct child by name",[1197,1229,1230,1235,1240],{},[1215,1231,1232],{},[247,1233,1234],{},"children(parent, name)",[1215,1236,1237],{},[247,1238,1239],{},"Element[]",[1215,1241,1242],{},"All direct children by name",[1197,1244,1245,1250,1254],{},[1215,1246,1247],{},[247,1248,1249],{},"allChildren(parent)",[1215,1251,1252],{},[247,1253,1239],{},[1215,1255,1256],{},"All direct children",[1197,1258,1259,1264,1269],{},[1215,1260,1261],{},[247,1262,1263],{},"childText(parent, name)",[1215,1265,1266],{},[247,1267,1268],{},"string",[1215,1270,1271],{},"Text of first matching child",[1197,1273,1274,1279,1283],{},[1215,1275,1276],{},[247,1277,1278],{},"textOf(element)",[1215,1280,1281],{},[247,1282,1268],{},[1215,1284,1285],{},"Text content of element",[1197,1287,1288,1293,1297],{},[1215,1289,1290],{},[247,1291,1292],{},"collectText(element)",[1215,1294,1295],{},[247,1296,1268],{},[1215,1298,1299],{},"All text from descendants",[1197,1301,1302,1307,1312],{},[1215,1303,1304],{},[247,1305,1306],{},"attr(element, name)",[1215,1308,1309],{},[247,1310,1311],{},"string | undefined",[1215,1313,1314],{},"Attribute as string",[1197,1316,1317,1322,1327],{},[1215,1318,1319],{},[247,1320,1321],{},"attrNum(element, name)",[1215,1323,1324],{},[247,1325,1326],{},"number | undefined",[1215,1328,1329],{},"Attribute as number",[1197,1331,1332,1337,1342],{},[1215,1333,1334],{},[247,1335,1336],{},"attrBool(element, name)",[1215,1338,1339],{},[247,1340,1341],{},"boolean | undefined",[1215,1343,1344],{},"Attribute as boolean",[1197,1346,1347,1352,1356],{},[1215,1348,1349],{},[247,1350,1351],{},"colorAttr(element, name)",[1215,1353,1354],{},[247,1355,1311],{},[1215,1357,1358],{},"Hex color attribute",[1197,1360,1361,1366,1371],{},[1215,1362,1363],{},[247,1364,1365],{},"hasChild(parent, name)",[1215,1367,1368],{},[247,1369,1370],{},"boolean",[1215,1372,1373],{},"Child exists check",[1197,1375,1376,1381,1385],{},[1215,1377,1378],{},[247,1379,1380],{},"findDeep(parent, name)",[1215,1382,1383],{},[247,1384,1239],{},[1215,1386,1387],{},"All descendants by name",[1197,1389,1390,1395,1400],{},[1215,1391,1392],{},[247,1393,1394],{},"childCount(parent)",[1215,1396,1397],{},[247,1398,1399],{},"number",[1215,1401,1402],{},"Direct child count",[1404,1405,1406],"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}",{"title":274,"searchDepth":320,"depth":320,"links":1408},[1409,1414,1419,1425,1430],{"id":258,"depth":320,"text":259,"children":1410},[1411,1412,1413],{"id":263,"depth":327,"text":264},{"id":386,"depth":327,"text":386},{"id":479,"depth":327,"text":480},{"id":532,"depth":320,"text":533,"children":1415},[1416,1417,1418],{"id":536,"depth":327,"text":537},{"id":632,"depth":327,"text":633},{"id":712,"depth":327,"text":713},{"id":768,"depth":320,"text":769,"children":1420},[1421,1422,1423,1424],{"id":772,"depth":327,"text":772},{"id":887,"depth":327,"text":888},{"id":920,"depth":327,"text":921},{"id":954,"depth":327,"text":955},{"id":1013,"depth":320,"text":1014,"children":1426},[1427,1428,1429],{"id":1017,"depth":327,"text":1018},{"id":1077,"depth":327,"text":1078},{"id":1140,"depth":327,"text":1141},{"id":1188,"depth":320,"text":1189},"Traverse and inspect parsed XML Element trees with helper functions","md",null,{},{"title":80,"description":1431},"7XVfehWn2CPg6Fe5idBkw3TfXTXIAVfMs48Fsu7AVQ4",[1438,1440],{"title":76,"path":77,"stem":78,"description":1439,"children":-1},"Convert Element trees back to XML strings with formatting options",{"title":84,"path":85,"stem":86,"description":1441,"children":-1},"Escape and build XML attribute strings safely",1778862995113]