xmltable

pivot XML parsing

独自空忆成欢 提交于 2021-02-11 13:56:48
问题 I have problem exactly like the post: Parse xmltype into table after pivot xml I want to use pivot xml and then parse the xml (maybe with xmltable function) to table. What can I do if I don't know the countries name and how many countries exist? Thanks! 来源: https://stackoverflow.com/questions/62794756/pivot-xml-parsing

How to re-order JSON in BaseX for conversion to CSV?

岁酱吖の 提交于 2020-03-06 09:43:46
问题 I have JSON data which is just slightly backwards in that the "name" key should be first. The desired output as CSV : people alice,z10,y9,x7,atrib6 sue,home5,cell4 joe,phone3,phone2,phone1 It only matters that the "name" for the CSV is first, the rest of the order is arbitrary and meaningless. Through the BaseX GUI I can export this data as: ,z10,y9,x7,atrib6,alice home5,cell4,sue phone3,phone2,phone1,joe people by selecting CSV , although that leading comma looks odd. However, this is very

How to create a new list item with FLOWR and XQuery?

我的梦境 提交于 2020-02-25 06:30:49
问题 I'm looking to select non-numerical data from an XML file towards shredding it into database columns, or at least an xmltable -like structure. This FLWOR gives a somewhat useful result: xquery version "3.0"; declare namespace office="urn:oasis:names:tc:opendocument:xmlns:text:1.0"; <ul> { for $foo in db:open("foo") return <li>{$foo//text()[not(matches(., '[0-9]'))]}</li> } </ul> However, it outputs all results into a single li tag, like: a b c d Preferred output would be of the form: a b Most

From XML to list of paths in Oracle 12c [closed]

∥☆過路亽.° 提交于 2020-01-25 10:40:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . From XML to list of paths in Oracle PL/SQL environment shows how to list all the XPATHs of each XML element in an XML document and their corresponding values. My Question is how to list all the XPATHs of the XML elements and the XPATHs of their attributes and the corresponding values? Oracle Setup : CREATE TABLE

Create sub tables in Excel sheet from an xml using python element tree

穿精又带淫゛_ 提交于 2020-01-11 13:18:59
问题 <?xml version="1.0" encoding="UTF-8"?> -<Metrics> -<File name="N:/Users/Source/Callbacks.c"> -<Entity name="N:/Users/Source/CAN_Callbacks.c" type="file"> <Metric name="STTDE" value="2.205"/> <Metric name="STM28" value="27"/> <Metric name="STTDO" value="1.999"/> </Entity> -<Entity name="ApplNwmBusoff" type="function"> <Metric name="STM07" value="1"/> <Metric name="STUNV" value="1"/> <Metric name="STSUB" value="1"/> </Entity> </File> </Metrics> This is the xml code. I want to create subtables

Oracle XMLTABLE left outer join doesn't return results when XPath doesn't exist

梦想的初衷 提交于 2020-01-07 03:23:08
问题 The table tbl has a column xml_data of type XMLTYPE. Consider the following XML: <root> <element> <id>1</id> <data>abc</data> </element> <element> <id>2</id> <data>def</data> </element> </root> I need a select statement that will return 1 row for each row in tbl, with 3 columns: id1, id2 & id3. id1 will get the value of the "data" tag from the "element" node where the "id" is 1. id2 will get the value from the node where "id" is 2, etc. In case there is no element for a certain id (like id3

Selecting from and inserting to complex Oracle XMLTYPE data

╄→尐↘猪︶ㄣ 提交于 2020-01-04 15:14:09
问题 I've written simple Oracle queries to extract XMLTYPE data before, but this XML is different - I need to pull information from attributes, child elements, and their respective attributes. I also would like to write an INSERT statement as well (preferably one that is able to find the highest option value and add 1). Consider the following XML: <metadata> <fields> <field name="cusInt01" label="Reference point"> <option value="1">CB</option> <option value="2">CF</option> <option value="3">DF<

Convert flat XML table data where elements are concatenated row and column names into nested XML, using XSLT 1.0

喜欢而已 提交于 2020-01-03 17:12:39
问题 I have XML output representing a table of data being output like this: <results> <Row1.Name>Henry</Row1.Name> <Row1.Id>P162</Row1.Id> <Row1.Age>23</Row1.Age> <Row2.Name>John</Row2.Name> <Row2.Id>P137</Row2.Id> <Row2.Age>27</Row2.Age> <Row3.Name>Mary</Row3.Name> <Row3.Id>L493</Row3.Id> <Row3.Age>32</Row3.Age> </results> and I want to convert it to this: <results> <Row> <Name>Henry</Name> <Id>P162<Id> <Age>23</Age> </Row> <Row> <Name>John</Name> <Id>P137<Id> <Age>27</Age> </Row> <Row> <Name

Convert flat XML table data where elements are concatenated row and column names into nested XML, using XSLT 1.0

前提是你 提交于 2020-01-03 17:12:08
问题 I have XML output representing a table of data being output like this: <results> <Row1.Name>Henry</Row1.Name> <Row1.Id>P162</Row1.Id> <Row1.Age>23</Row1.Age> <Row2.Name>John</Row2.Name> <Row2.Id>P137</Row2.Id> <Row2.Age>27</Row2.Age> <Row3.Name>Mary</Row3.Name> <Row3.Id>L493</Row3.Id> <Row3.Age>32</Row3.Age> </results> and I want to convert it to this: <results> <Row> <Name>Henry</Name> <Id>P162<Id> <Age>23</Age> </Row> <Row> <Name>John</Name> <Id>P137<Id> <Age>27</Age> </Row> <Row> <Name