HyukjinKwon commented on code in PR #43462:
URL: https://github.com/apache/spark/pull/43462#discussion_r1366491264
##########
python/pyspark/sql/readwriter.py:
##########
@@ -821,6 +821,128 @@ def func(iterator):
},
)
+ def xml(
+ self,
+ path: PathOrPaths,
+ rowTag: str,
+ schema: Optional[Union[StructType, str]] = None,
+ excludeAttribute: Optional[Union[bool, str]] = None,
+ attributePrefix: Optional[str] = None,
+ valueTag: Optional[str] = None,
+ ignoreSurroundingSpaces: Optional[Union[bool, str]] = None,
+ rowValidationXSDPath: Optional[str] = None,
+ ignoreNamespace: Optional[Union[bool, str]] = None,
+ wildcardColName: Optional[str] = None,
+ encoding: Optional[str] = None,
+ inferSchema: Optional[Union[bool, str]] = None,
+ nullValue: Optional[str] = None,
+ dateFormat: Optional[str] = None,
+ timestampFormat: Optional[str] = None,
+ mode: Optional[str] = None,
+ columnNameOfCorruptRecord: Optional[str] = None,
+ multiLine: Optional[Union[bool, str]] = None,
+ samplingRatio: Optional[Union[float, str]] = None,
+ locale: Optional[str] = None,
+ ) -> "DataFrame":
+ r"""Loads a XML file and returns the result as a :class:`DataFrame`.
+
+ If the ``schema`` parameter is not specified, this function goes
+ through the input once to determine the input schema.
+
+ .. versionadded:: 4.0.0
+
+ Parameters
+ ----------
+ path : str or list
Review Comment:
```suggestion
path : str, list or :class:`RDD`
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]