diff --git a/ncclient/operations/util.py b/ncclient/operations/util.py
index bb03502..b760fd1 100755
--- a/ncclient/operations/util.py
+++ b/ncclient/operations/util.py
@@ -56,6 +56,10 @@ def build_filter(spec, capcheck=None):
             rep.append(to_ele(criteria))
         else:
             raise OperationError("Invalid filter type")
+    elif isinstance(spec, list):
+        rep = new_ele("filter", type="subtree")
+        for cri in spec:
+            rep.append(to_ele(cri))
     else:
 
         rep = validated_element(spec, ("filter", qualify("filter"),

get() operation not accepting multiple subtree filters
I am trying to get RPC reply of multiple sub trees at once via get() operation as below but its giving me an error.
```python
getfacts='''
    <host-names xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg"/>
    <system-time xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper"/>
    <interfaces xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-pfi-im-cmd-oper">
     <interfaces>
       <interface>
        <interface-name/>
       </interface>
      </interfaces>
     </interfaces>
    <inventory xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-invmgr-oper">
     <racks>
       <rack>
        <attributes>
            <inv-basic-bag>
                <software-revision/>
                <model-name/>
                <serial-number/>
            </inv-basic-bag>
        </attributes>
       </rack>
      </racks>
     </inventory>'''
  
def connect(host, port, user, password, source):
    conn = manager.connect(host=host,
                           port=port,
                           username=user,
                           password = password,
                           device_params={'name': 'iosxr'}
                           )

    rpc_reply = conn.get(filter=('subtree', getfacts)).xml
    print(rpc_reply)
```

Error:
```
return x if etree.iselement(x) else etree.fromstring(x.encode('UTF-8'), parser=_get_parser(huge_tree))
  File "src/lxml/etree.pyx", line 3235, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1764, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
  File "<string>", line 4
lxml.etree.XMLSyntaxError: Extra content at the end of the document, line 4, column 5
```
diff --git a/test/unit/operations/test_retrieve.py b/test/unit/operations/test_retrieve.py
index fdf5b23..d5166fe 100644
--- a/test/unit/operations/test_retrieve.py
+++ b/test/unit/operations/test_retrieve.py
@@ -220,3 +220,43 @@ class TestRetrieve(unittest.TestCase):
         call = mock_request.call_args_list[0][0][0]
         call = ElementTree.tostring(call)
         self.assertEqual(call, xml)
+
+    @patch('ncclient.operations.retrieve.RPC._request')
+    def test_get_with_multi_subtree_filters(self, mock_request):
+        result = '''
+                <?xml version="1.0" encoding="UTF-8"?>
+                <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
+                      xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+                    <cont1 xmlns="urn:mod1">
+                        <le1>test_mod1_001</le1>
+                        <le2>this is a test-one example</le2>
+                    </cont1>
+                    <cont2 xmlns="urn:mod2">
+                        <le1>test_mod2_002</le1>
+                        <le2>this is a test-two example</le2>
+                        <lst>
+                            <le3>a list of mod2</le3>
+                        </lst>
+                    </cont2>
+                </data>'''
+        mock_request.return_value = result
+        session = ncclient.transport.SSHSession(self.device_handler)
+        obj = Get(session, self.device_handler, raise_mode=RaiseMode.ALL)
+
+        multi_subtree_filters = [
+            '<cont1 xmlns="urn:mod1"> \
+                <le1/> \
+                <le2/> \
+             </cont1>',
+             '<cont2 xmlns="urn:mod2"/>'
+        ]
+
+        ret = obj.request(copy.deepcopy(multi_subtree_filters))
+        node = new_ele("get")
+        node.append(util.build_filter(multi_subtree_filters))
+        xml = ElementTree.tostring(node)
+        call = mock_request.call_args_list[0][0][0]
+        call = ElementTree.tostring(call)
+        self.assertEqual(call, xml)
+        self.assertEqual(ret, result)
+

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov sphinx flake8 mock nose
apt-get update apt-get install -y gcc libxml2-dev libxslt1-dev
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
bcrypt==4.0.1
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
coverage==6.2
cryptography==40.0.2
docutils==0.18.1
flake8==3.9.2
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
lxml==5.3.1
MarkupSafe==2.0.1
mccabe==0.6.1
mock==5.2.0
-e git+https://github.com/ncclient/ncclient.git@790c1e9eecf07bd67d1a86a5e579827a9f6dad9d#egg=ncclient
nose==1.3.7
packaging==21.3
paramiko==3.5.1
pluggy==1.0.0
py==1.11.0
pycodestyle==2.7.0
pycparser==2.21
pyflakes==2.3.1
Pygments==2.14.0
PyNaCl==1.5.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytz==2025.2
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: ncclient
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - bcrypt==4.0.1
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - coverage==6.2
      - cryptography==40.0.2
      - docutils==0.18.1
      - flake8==3.9.2
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - lxml==5.3.1
      - markupsafe==2.0.1
      - mccabe==0.6.1
      - mock==5.2.0
      - nose==1.3.7
      - packaging==21.3
      - paramiko==3.5.1
      - pluggy==1.0.0
      - py==1.11.0
      - pycodestyle==2.7.0
      - pycparser==2.21
      - pyflakes==2.3.1
      - pygments==2.14.0
      - pynacl==1.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytz==2025.2
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/ncclient

test/unit/operations/test_retrieve.py::TestRetrieve::test_get_with_multi_subtree_filters
test/unit/operations/test_retrieve.py::TestRetrieve::test_dispatch test/unit/operations/test_retrieve.py::TestRetrieve::test_dispatch_2 test/unit/operations/test_retrieve.py::TestRetrieve::test_get test/unit/operations/test_retrieve.py::TestRetrieve::test_get_config test/unit/operations/test_retrieve.py::TestRetrieve::test_get_config_with_defaults test/unit/operations/test_retrieve.py::TestRetrieve::test_get_config_with_defaults_missing_capability test/unit/operations/test_retrieve.py::TestRetrieve::test_get_schema test/unit/operations/test_retrieve.py::TestRetrieve::test_get_with_defaults_also_supported test/unit/operations/test_retrieve.py::TestRetrieve::test_get_with_defaults_basic_mode test/unit/operations/test_retrieve.py::TestRetrieve::test_get_with_defaults_missing_capability test/unit/operations/test_retrieve.py::TestRetrieve::test_get_with_defaults_not_supported
ncclient/operations/util.py
ncclient/operations/util.py