Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在捕获属性时对aws glue中的嵌套xml标记进行分类_Xml_Aws Glue - Fatal编程技术网

如何在捕获属性时对aws glue中的嵌套xml标记进行分类

如何在捕获属性时对aws glue中的嵌套xml标记进行分类,xml,aws-glue,Xml,Aws Glue,我有以下xml示例: <ParentTag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="68067108" ClientID="1" DocumentCreationDate="2018-04-10T00:00:05" DocumentVersion="9" EventClassID="1987" STBLogCreationDate="2018-04-09T11:38:59" SampleID="496" xsi:n

我有以下xml示例:

<ParentTag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="68067108" ClientID="1" DocumentCreationDate="2018-04-10T00:00:05" DocumentVersion="9" EventClassID="1987" STBLogCreationDate="2018-04-09T11:38:59" SampleID="496" xsi:noNamespaceSchemaLocation="/opt/web/ams_proxy/webapps/ams_proxy/WEB-INF/amsXmlSchema_DTVPA_Version9.xsd">
    <Event EventTime="2018-04-09T11:41:02">
        <LiveViewEvent>
            <Channel channelObjectId="3062323">
                <Stream streamId="40" streamType="Video"/>
                <Stream streamId="41" streamType="Audio"/>
                <Stream streamId="65535" streamType="Data"/>
            </Channel>
        </LiveViewEvent>
    </Event>
</ParentTag>

我需要ParentTag中的id、EventTime和LiveViewEvent数据(channelObject、视频、音频和数据)。我已经开始在LiveViewEvent(作为结构)和EventTime中获取数据,但它似乎跳过了ParentTag中的属性。 也许我还应该提到,除了具有不同数据的LiveViewEvent之外,还有其他类型的事件,但我不需要它们

非常感谢您的帮助


谢谢,

我认为唯一的方法是在AWS Glue控制台中创建一个分类器,将行标记作为“ParentTag”,然后您将能够使用struct和array数据类型选择必要的数据