mteb/BrightProStackoverflowRetrieval huggingface dataset:
](../../api/polars.exceptions.SchemaError.html)
    * [ polars.exceptions.SchemaFieldNotFoundError ](../../api/polars.exceptions.SchemaFieldNotFoundError.html)
    * [ polars.exceptions.ShapeError ](../../api/polars.exceptions.ShapeError.html)
    * [ polars.exceptions.StructFieldNotFoundError ](../../api/polars.exceptions.StructFieldNotFoundError.html)
    * [ polars.exceptions.TooManyRowsReturnedError ](../../api/polars.exceptions.TooManyRowsReturnedError.html)

  * [ Testing ](../../testing.html) __
    * [ polars.testing.assert_frame_equal ](../../api/polars.testing.assert_frame_equal.html)
    * [ polars.testing.assert_frame_not_equal ](../../api/polars.testing.assert_frame_not_equal.html)
    * [ polars.testing.assert_series_equal ](../../api/polars.testing.assert_series_equal.html)
    * [ polars.testing.assert_series_not_equal ](../../api/polars.testing.assert_series_not_equal.html)
    * [ polars.testing.parametric.dataframes ](../../api/polars.testing.parametric.dataframes.html)
    * [ polars.testing.parametric.series ](../../api/polars.testing.parametric.series.html)
    * [ polars.testing.parametric.column ](../../api/polars.testing.parametric.column.html)
    * [ polars.testing.parametric.columns ](../../api/polars.testing.parametric.columns.html)
    * [ polars.testing.parametric.create_list_strategy ](../../api/polars.testing.parametric.create_list_strategy.html)
    * [ polars.testing.parametric.load_profile ](../../api/polars.testing.parametric.load_profile.html)
    * [ polars.testing.parametric.set_profile ](../../api/polars.testing.parametric.set_profile.html)

  * [ Metadata ](../../metadata.html) __
    * [ polars.build_info ](../../api/polars.build_info.html)
    * [ polars.get_index_type ](../../api/polars.get_index_type.html)
    * [ polars.show_versions ](../../api/polars.show_versions.html)
    * [ polars.thread_pool_size ](../../api/polars.thread_pool_size.html)
    * [ polars.threadpool_size ](../../api/polars.threadpool_size.html)

  * [ __ ](../../../index.html)
  * [ Python API reference ](../../index.html)
  * __
  * [ List ](../list.html)
  * polars.Serie... 

#  polars.Series.list.len  #

Series.list.  len  (  )  →  Series  [ [source]  ](https://github.com/pola-
rs/polars/blob/py-0.20.23/py-polars/polars/series/list.py#L91-L112) #

    

Return the number of elements in each list.

Null values count towards the total.

Returns  :

    

Series

    

Series of data type ` UInt32  ` .

Examples

    
    
    >>> s = pl.Series([[1, 2, None], [5]])
    >>> s.list.len()
    shape: (2,)
    Series: '' [u32]
    [
        3
        1
    ]
    

[ __ previous  polars.Series.list.last  ](polars.Series.list.last.html
"previous page") [ next  polars.Series.list.lengths  __
](polars.Series.list.lengths.html "next page")

__ On this page

  * ` Series.list.len()  `

© Copyright 2020, Ritchie Vink.  

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.4.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.1.
assert_frame_equal.html)
    * [ polars.testing.assert_frame_not_equal ](../../api/polars.testing.assert_frame_not_equal.html)
    * [ polars.testing.assert_series_equal ](../../api/polars.testing.assert_series_equal.html)
    * [ polars.testing.assert_series_not_equal ](../../api/polars.testing.assert_series_not_equal.html)
    * [ polars.testing.parametric.dataframes ](../../api/polars.testing.parametric.dataframes.html)
    * [ polars.testing.parametric.series ](../../api/polars.testing.parametric.series.html)
    * [ polars.testing.parametric.column ](../../api/polars.testing.parametric.column.html)
    * [ polars.testing.parametric.columns ](../../api/polars.testing.parametric.columns.html)
    * [ polars.testing.parametric.create_list_strategy ](../../api/polars.testing.parametric.create_list_strategy.html)
    * [ polars.testing.parametric.load_profile ](../../api/polars.testing.parametric.load_profile.html)
    * [ polars.testing.parametric.set_profile ](../../api/polars.testing.parametric.set_profile.html)

  * [ Metadata ](../../metadata.html) __
    * [ polars.build_info ](../../api/polars.build_info.html)
    * [ polars.get_index_type ](../../api/polars.get_index_type.html)
    * [ polars.show_versions ](../../api/polars.show_versions.html)
    * [ polars.thread_pool_size ](../../api/polars.thread_pool_size.html)
    * [ polars.threadpool_size ](../../api/polars.threadpool_size.html)

  * [ __ ](../../../index.html)
  * [ Python API reference ](../../index.html)
  * __
  * [ Manipulation/selection ](../modify_select.html)
  * polars.Expr.floor 

#  polars.Expr.floor  #

Expr.  floor  (  )  →  Self  [ [source]  ](https://github.com/pola-
rs/polars/blob/main/py-polars/polars/expr/expr.py#L1757-L1779) #

    

Rounds down to the nearest integer value.

Only works on floating point Series.

Examples

    
    
    >>> df = pl.DataFrame({"a": [0.3, 0.5, 1.0, 1.1]})
    >>> df.select(pl.col("a").floor())
    shape: (4, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ f64 │
    ╞═════╡
    │ 0.0 │
    │ 0.0 │
    │ 1.0 │
    │ 1.0 │
    └─────┘
    

[ __ previous  polars.Expr.flatten  ](polars.Expr.flatten.html "previous
page") [ next  polars.Expr.forward_fill  __ ](polars.Expr.forward_fill.html
"next page")

__ On this page

  * ` Expr.floor()  `

© Copyright 2020, Ritchie Vink.  

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.4.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.1.
.assert_frame_equal.html)
    * [ polars.testing.assert_frame_not_equal ](../../api/polars.testing.assert_frame_not_equal.html)
    * [ polars.testing.assert_series_equal ](../../api/polars.testing.assert_series_equal.html)
    * [ polars.testing.assert_series_not_equal ](../../api/polars.testing.assert_series_not_equal.html)
    * [ polars.testing.parametric.dataframes ](../../api/polars.testing.parametric.dataframes.html)
    * [ polars.testing.parametric.series ](../../api/polars.testing.parametric.series.html)
    * [ polars.testing.parametric.column ](../../api/polars.testing.parametric.column.html)
    * [ polars.testing.parametric.columns ](../../api/polars.testing.parametric.columns.html)
    * [ polars.testing.parametric.create_list_strategy ](../../api/polars.testing.parametric.create_list_strategy.html)
    * [ polars.testing.parametric.load_profile ](../../api/polars.testing.parametric.load_profile.html)
    * [ polars.testing.parametric.set_profile ](../../api/polars.testing.parametric.set_profile.html)

  * [ Metadata ](../../metadata.html) __
    * [ polars.build_info ](../../api/polars.build_info.html)
    * [ polars.get_index_type ](../../api/polars.get_index_type.html)
    * [ polars.show_versions ](../../api/polars.show_versions.html)
    * [ polars.thread_pool_size ](../../api/polars.thread_pool_size.html)
    * [ polars.threadpool_size ](../../api/polars.threadpool_size.html)

  * [ __ ](../../../index.html)
  * [ Python API reference ](../../index.html)
  * __
  * [ Computation ](../computation.html)
  * polars.Expr.sign 

#  polars.Expr.sign  #

Expr.  sign  (  )  →  Self  [ [source]  ](https://github.com/pola-
rs/polars/blob/main/py-polars/polars/expr/expr.py#L8366-L8395) #

    

Compute the element-wise indication of the sign.

The returned values can be -1, 0, or 1:

  * -1 if x < 0\. 

  * 0 if x == 0. 

  * 1 if x > 0\. 

(null values are preserved as-is).

Examples

    
    
    >>> df = pl.DataFrame({"a": [-9.0, -0.0, 0.0, 4.0, None]})
    >>> df.select(pl.col("a").sign())
    shape: (5, 1)
    ┌──────┐
    │ a    │
    │ ---  │
    │ i64  │
    ╞══════╡
    │ -1   │
    │ 0    │
    │ 0    │
    │ 1    │
    │ null │
    └──────┘
    

[ __ previous  polars.Expr.search_sorted  ](polars.Expr.search_sorted.html
"previous page") [ next  polars.Expr.sin  __ ](polars.Expr.sin.html "next
page")

__ On this page

  * ` Expr.sign()  `

© Copyright 2020, Ritchie Vink.  

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.4.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.1.
../../api/polars.exceptions.SchemaError.html)
    * [ polars.exceptions.SchemaFieldNotFoundError ](../../api/polars.exceptions.SchemaFieldNotFoundError.html)
    * [ polars.exceptions.ShapeError ](../../api/polars.exceptions.ShapeError.html)
    * [ polars.exceptions.StructFieldNotFoundError ](../../api/polars.exceptions.StructFieldNotFoundError.html)
    * [ polars.exceptions.TooManyRowsReturnedError ](../../api/polars.exceptions.TooManyRowsReturnedError.html)

  * [ Testing ](../../testing.html) __
    * [ polars.testing.assert_frame_equal ](../../api/polars.testing.assert_frame_equal.html)
    * [ polars.testing.assert_frame_not_equal ](../../api/polars.testing.assert_frame_not_equal.html)
    * [ polars.testing.assert_series_equal ](../../api/polars.testing.assert_series_equal.html)
    * [ polars.testing.assert_series_not_equal ](../../api/polars.testing.assert_series_not_equal.html)
    * [ polars.testing.parametric.dataframes ](../../api/polars.testing.parametric.dataframes.html)
    * [ polars.testing.parametric.series ](../../api/polars.testing.parametric.series.html)
    * [ polars.testing.parametric.column ](../../api/polars.testing.parametric.column.html)
    * [ polars.testing.parametric.columns ](../../api/polars.testing.parametric.columns.html)
    * [ polars.testing.parametric.create_list_strategy ](../../api/polars.testing.parametric.create_list_strategy.html)
    * [ polars.testing.parametric.load_profile ](../../api/polars.testing.parametric.load_profile.html)
    * [ polars.testing.parametric.set_profile ](../../api/polars.testing.parametric.set_profile.html)

  * [ Metadata ](../../metadata.html) __
    * [ polars.build_info ](../../api/polars.build_info.html)
    * [ polars.get_index_type ](../../api/polars.get_index_type.html)
    * [ polars.show_versions ](../../api/polars.show_versions.html)
    * [ polars.thread_pool_size ](../../api/polars.thread_pool_size.html)
    * [ polars.threadpool_size ](../../api/polars.threadpool_size.html)

  * [ __ ](../../../index.html)
  * [ Python API reference ](../../index.html)
  * __
  * [ List ](../list.html)
  * polars.Serie... 

#  polars.Series.list.first  #

Series.list.  first  (  )  →  Series  [ [source]  ](https://github.com/pola-
rs/polars/blob/py-0.20.23/py-polars/polars/series/list.py#L529-L544) #

    

Get the first value of the sublists.

Examples

    
    
    >>> s = pl.Series("a", [[3, 2, 1], [], [1, 2]])
    >>> s.list.first()
    shape: (3,)
    Series: 'a' [i64]
    [
        3
        null
        1
    ]
    

[ __ previous  polars.Series.list.explode  ](polars.Series.list.explode.html
"previous page") [ next  polars.Series.list.gather  __
](polars.Series.list.gather.html "next page")

__ On this page

  * ` Series.list.first()  `

© Copyright 2020, Ritchie Vink.  

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.4.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.1.
-4th-ed.jpg) Learning jQuery Fourth Edition  Karl Swedberg and Jonathan Chaffer  ](https://www.packtpub.com/web-development/learning-jquery-fourth-edition)
  * [ ![jQuery in Action by Bear Bibeault, Yehuda Katz, and Aurelio De Rosa](https://api.jquery.com/wp-content/themes/jquery/content/books/jquery-in-action.jpg) jQuery in Action  Bear Bibeault, Yehuda Katz, and Aurelio De Rosa  ](https://www.manning.com/books/jquery-in-action-third-edition)
  * [ ![jQuery Succinctly by Cody Lindley](https://api.jquery.com/wp-content/themes/jquery/content/books/jquery-succinctly.jpg) jQuery Succinctly  Cody Lindley  ](https://www.syncfusion.com/ebooks/jquery)

  * [ Learning Center ](https://learn.jquery.com/)
  * [ Chat ](https://jquery.com/support/)
  * [ Twitter ](https://twitter.com/jquery)
  * [ GitHub ](https://github.com/jquery)

Copyright 2024 [ OpenJS Foundation ](https://openjsf.org/) and jQuery
contributors. All rights reserved. See [ jQuery License
](https://jquery.org/license/) for more information. The [ OpenJS Foundation
](https://openjsf.org/) has registered trademarks and uses trademarks. For a
list of trademarks of the [ OpenJS Foundation ](https://openjsf.org/) , please
see our [ Trademark Policy ](https://trademark-policy.openjsf.org/) and [
Trademark List ](https://trademark-list.openjsf.org/) . Trademarks and logos
not indicated on the [ list of OpenJS Foundation trademarks
](https://trademark-list.openjsf.org/) are trademarks™ or registered®
trademarks of their respective holders. Use of them does not imply any
affiliation with or endorsement by them. OpenJS Foundation [ Terms of Use
](https://terms-of-use.openjsf.org/) , [ Privacy ](https://privacy-
policy.openjsf.org/) , and [ Cookie ](https://www.linuxfoundation.org/cookies)
Policies also apply.

[ Web hosting by Digital Ocean ](https://www.digitalocean.com) | [ CDN by Fastly ](https://www.fastly.com/) | [ Powered by WordPress ](https://wordpress.org/)
hemes/jquery/content/books/jquery-succinctly.jpg) jQuery Succinctly  Cody Lindley  ](https://www.syncfusion.com/ebooks/jquery)

  * [ Learning Center ](https://learn.jquery.com/)
  * [ Chat ](https://jquery.com/support/)
  * [ Twitter ](https://twitter.com/jquery)
  * [ GitHub ](https://github.com/jquery)

Copyright 2024 [ OpenJS Foundation ](https://openjsf.org/) and jQuery
contributors. All rights reserved. See [ jQuery License
](https://jquery.org/license/) for more information. The [ OpenJS Foundation
](https://openjsf.org/) has registered trademarks and uses trademarks. For a
list of trademarks of the [ OpenJS Foundation ](https://openjsf.org/) , please
see our [ Trademark Policy ](https://trademark-policy.openjsf.org/) and [
Trademark List ](https://trademark-list.openjsf.org/) . Trademarks and logos
not indicated on the [ list of OpenJS Foundation trademarks
](https://trademark-list.openjsf.org/) are trademarks™ or registered®
trademarks of their respective holders. Use of them does not imply any
affiliation with or endorsement by them. OpenJS Foundation [ Terms of Use
](https://terms-of-use.openjsf.org/) , [ Privacy ](https://privacy-
policy.openjsf.org/) , and [ Cookie ](https://www.linuxfoundation.org/cookies)
Policies also apply.

[ Web hosting by Digital Ocean ](https://www.digitalocean.com) | [ CDN by Fastly ](https://www.fastly.com/) | [ Powered by WordPress ](https://wordpress.org/)
* App manifest file 

      * About app manifests 
      * <action>
      * <activity>
      * <activity-alias>
      * <application>
      * <category>
      * <compatible-screens>
      * <data>
      * <grant-uri-permission>
      * <instrumentation>
      * <intent-filter>
      * <layout>
      * <manifest>
      * <meta-data>
      * <path-permission>
      * <permission>
      * <permission-group>
      * <permission-tree>
      * <profileable>
      * <property>
      * <provider>
      * <queries>
      * <receiver>
      * <service>
      * <supports-gl-texture>
      * <supports-screens>
      * <uses-configuration>
      * <uses-feature>
      * <uses-library>
      * <uses-native-library>
      * <uses-permission>
      * <uses-permission-sdk-23>
      * <uses-sdk>
interface Props extends PanelProps<SimpleOptions> {}
    
    export const SimplePanel: React.FC<Props> = ({ options, data, width, height }) => {
      
      return (
    
        <div >
          <div id="tree">
            <ul>
              <li>Root node 1</li>
              <li>Root node 2</li>
            </ul>
          </div>
          // I tried calling $("#tree").jstree() inside {} here but, but it seems the <div id="tree"> is undefined here
        </div>
      );
    };
    
    

I’ve developed this plugin in older version of grafana(6) without any problem.
But I don’t know How can I do this in this version. I know, maybe my approach
is incorrect in this version, But I need to use jquery and I need to call
jquery functions after complete rendering of html.
<span onClick={e => e.preventDefault()}>
          <div>
            <Select />
          </div>
          <div>
            <Select />
          </div>
          <div>
            <Select />
          </div>
      </span>
    

Thanks @ptboyer  
---  
  
🎉  3  peterboyer, sllvn, and JohnDDuncanIII reacted with hooray emoji
s://api.jquery.com/wp-content/themes/jquery/content/books/jquery-succinctly.jpg) jQuery Succinctly  Cody Lindley  ](https://www.syncfusion.com/ebooks/jquery)

  * [ Learning Center ](https://learn.jquery.com/)
  * [ Chat ](https://jquery.com/support/)
  * [ Twitter ](https://twitter.com/jquery)
  * [ GitHub ](https://github.com/jquery)

Copyright 2024 [ OpenJS Foundation ](https://openjsf.org/) and jQuery
contributors. All rights reserved. See [ jQuery License
](https://jquery.org/license/) for more information. The [ OpenJS Foundation
](https://openjsf.org/) has registered trademarks and uses trademarks. For a
list of trademarks of the [ OpenJS Foundation ](https://openjsf.org/) , please
see our [ Trademark Policy ](https://trademark-policy.openjsf.org/) and [
Trademark List ](https://trademark-list.openjsf.org/) . Trademarks and logos
not indicated on the [ list of OpenJS Foundation trademarks
](https://trademark-list.openjsf.org/) are trademarks™ or registered®
trademarks of their respective holders. Use of them does not imply any
affiliation with or endorsement by them. OpenJS Foundation [ Terms of Use
](https://terms-of-use.openjsf.org/) , [ Privacy ](https://privacy-
policy.openjsf.org/) , and [ Cookie ](https://www.linuxfoundation.org/cookies)
Policies also apply.

[ Web hosting by Digital Ocean ](https://www.digitalocean.com) | [ CDN by Fastly ](https://www.fastly.com/) | [ Powered by WordPress ](https://wordpress.org/)
* [ Code  ](/moe091/my-site)
* [ Issues  ](/moe091/my-site/issues)
* [ Pull requests  ](/moe091/my-site/pulls)
* [ Actions  ](/moe091/my-site/actions)
* [ Projects  ](/moe091/my-site/projects)
* [ Security  ](/moe091/my-site/security)
* [ Insights  ](/moe091/my-site/pulse)
* [ Code  ](/moe091/my-site)
* [ Issues  0  ](/moe091/my-site/issues)
* [ Pull requests  0  ](/moe091/my-site/pulls)
* [ Actions  ](/moe091/my-site/actions)
* [ Projects  0  ](/moe091/my-site/projects)
* [ Security  ](/moe091/my-site/security)
* [ Insights  ](/moe091/my-site/pulse)
Python

    
    
    >>> import untangle
    
    >>> # Parse XML from a URL
    >>> untangle.parse("http://localhost:8000/smiley.svg")
    Element(name = None, attributes = None, cdata = )
    
    >>> # Parse XML from a filename
    >>> untangle.parse("smiley.svg")
    Element(name = None, attributes = None, cdata = )
    
    >>> # Parse XML from a file object
    >>> with open("smiley.svg") as file:
    ...     untangle.parse(file)
    ...
    Element(name = None, attributes = None, cdata = )
    
    >>> # Parse XML from a Python string
    >>> untangle.parse("""\
    ... <svg viewBox="-105 -100 210 270">
    ...   <!-- More content goes here... -->
    ... </svg>
    ... """)
    Element(name = None, attributes = None, cdata = )
Python

    
    
    >>> from xml.sax import parse
    >>> from svg_handler import SVGHandler
    >>> parse("smiley.svg", SVGHandler())
    BEGIN: <svg>, ['xmlns', 'xmlns:inkscape', 'viewBox', 'width', 'height']
    BEGIN: <inkscape:custom>, ['x', 'inkscape:z']
    CONTENT: 'Some value'
    END: </inkscape:custom>
    BEGIN: <defs>, []
    BEGIN: <linearGradient>, ['id', 'x1', 'x2', 'y1', 'y2']
    BEGIN: <stop>, ['offset', 'stop-color', 'stop-opacity']
    END: </stop>
    ⋮
XML

    
    
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
        <!ENTITY custom_entity "Hello">
    ]>
    <svg xmlns="http://www.w3.org/2000/svg"
      xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
      viewBox="-105 -100 210 270" width="210" height="270">
      <inkscape:custom x="42" inkscape:z="555">Some value</inkscape:custom>
      <defs>
        <linearGradient id="skin" x1="0" x2="0" y1="0" y2="1">
          <stop offset="0%" stop-color="yellow" stop-opacity="1.0"/>
          <stop offset="75%" stop-color="gold" stop-opacity="1.0"/>
          <stop offset="100%" stop-color="orange" stop-opacity="1"/>
        </linearGradient>
      </defs>
      <g id="smiley" inkscape:groupmode="layer" inkscape:label="Smiley">
        <!-- Head -->
        <circle cx="0" cy="0" r="50"
          fill="url(#skin)" stroke="orange" stroke-width="2"/>
        <!-- Eyes -->
        <ellipse cx="-20" cy="-10" rx="6" ry="8" fill="black" stroke="none"/>
        <ellipse cx="20" cy="-10" rx="6" ry="8" fill="black" stroke="none"/>
        <!-- Mouth -->
        <path d="M-20 20 A25 25 0 0 0 20 20"
          fill="white" stroke="black" stroke-width="3"/>
      </g>
      <text x="-40" y="75">&custom_entity; &lt;svg&gt;!</text>
      <script>
        <![CDATA[
          console.log("CDATA disables XML parsing: <svg>")
          const smiley = document.getElementById("smiley")
          const eyes = document.querySelectorAll("ellipse")
          const setRadius = r => e => eyes.forEach(x => x.setAttribute("ry", r))
          smiley.addEventListener("mouseenter", setRadius(2))
          smiley.addEventListener("mouseleave", setRadius(8))
        ]]>
      </script>
    </svg>
>>> namespaces = {"i": "http://www.inkscape.org/namespaces/inkscape"}
    
    >>> root.findtext("i:custom", namespaces=namespaces)
    'Some value'
    
    >>> for text in root.itertext():
    ...     if text.strip() != "":
    ...         print(text.strip())
    ...
    Some value
    Hello <svg>!
    console.log("CDATA disables XML parsing: <svg>")
    ⋮
    

Copied!
>>> import xml.etree.ElementTree as ET
    
    >>> # Parse XML from a filename
    >>> ET.parse("smiley.svg")
    <xml.etree.ElementTree.ElementTree object at 0x7fa4c980a6a0>
    
    >>> # Parse XML from a file object
    >>> with open("smiley.svg") as file:
    ...     ET.parse(file)
    ...
    <xml.etree.ElementTree.ElementTree object at 0x7fa4c96df340>
    
    >>> # Parse XML from a Python string
    >>> ET.fromstring("""\
    ... <svg viewBox="-105 -100 210 270">
    ...   <!-- More content goes here... -->
    ... </svg>
    ... """)
    <Element 'svg' at 0x7fa4c987a1d0>
    

Copied!
Python

    
    
    >>> import xmltodict
    
    >>> xmltodict.parse("""\
    ... <svg viewBox="-105 -100 210 270">
    ...   <!-- More content goes here... -->
    ... </svg>
    ... """)
    OrderedDict([('svg', OrderedDict([('@viewBox', '-105 -100 210 270')]))])
    
    >>> with open("smiley.svg", "rb") as file:
    ...     xmltodict.parse(file)
    ...
    OrderedDict([('svg', ...)])
Using the ` path  ` tag, it is possible to add a path to the list of search
paths. This can be useful for instance when some meshes and textures are
stored in a different directory, (e.g. when shared with other scenes). If the
path is a relative path, Mitsuba 3 will first try to interpret it relative to
the scene directory, then to other paths that are already on the search path
(e.g. added using the ` -a  <path1>;<path2>;..  ` command line argument).

    
    
    <path value="../../my_resources"/>
Python

    
    
    >>> from xml.dom.minidom import parse, parseString
    
    >>> # Parse XML from a filename
    >>> document = parse("smiley.svg")
    
    >>> # Parse XML from a file object
    >>> with open("smiley.svg") as file:
    ...     document = parse(file)
    ...
    
    >>> # Parse XML from a Python string
    >>> document = parseString("""\
    ... <svg viewBox="-105 -100 210 270">
    ...   <!-- More content goes here... -->
    ... </svg>
    ... """)
Copied!

It starts with an  XML declaration  , followed by a  Document Type Definition
(DTD)  and the ` <svg> ` root element  . The DTD is optional, but it can help
validate your document structure if you decide to use an XML validator. The
root element specifies the  default namespace  ` xmlns ` as well as a
prefixed namespace  ` xmlns:inkscape ` for editor-specific elements and
attributes. The document also contains: