question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for <Array> & <Array type="string"> in XMLReader

See original GitHub issue

Hi there,

Working with the attached data, I’ve noticed that:

  1. <Array> under <CellData> is not being processed (only <DataArray> is) I wonder why? It might also be a lack of knowledge of the format on my end, but it seems like both should be supported.

  2. Even if <Array> was processed, the string type would not be supported.
    Is that deliberate?

Again, it might be a hole in my knowledge regarding the format. Perhaps there is another mechanism to read <Array type="String"> that I am not aware of.

Do you have any hints / suggestions? Thanks for the help, Dan

example-vtp.zip

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
aminechircommented, Jan 7, 2020

I tried with the last version of vtk.js (13.4.2), precisely no, I don’t want to skip the string arrays

If I serialize a polydata incore from javascript, String arrays are parsed and I can access Field Data.

But if I try to use the xml parser for from an existing .vtp file, I get two problems:

  • string arrays inside CellData are not parsed : you already say that this feature is not implemented yet

  • all the FieldData are not parsed: I see that in XMLPolyDataReader class that effectively, FieldData are not included in the parser. Is it planed to parse the FieldData arrays ? Or maybe there is another way to do this ?

1reaction
jourdaincommented, Oct 16, 2019

We sure want to support them. But only when we will need them that we will put the effort to integrate them. This could come from a customer request unless it get contributed by someone from the community. As of today, I don’t have anyone (except you) that requested it. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

XMLReader - Apache NiFi
Arrays are considered as repetitive tags / fields in XML data. For the following XML data, "array_field" is considered to be an array...
Read more >
XML deserialization with array inside a class - Stack Overflow
Your problem is that your XML has an outer element that is not accounted for in your data model, namely the <STATE-COUNTY-FILE> element:...
Read more >
How to convert XML file into array in PHP? - GeeksforGeeks
Given an XML document and the task is to convert an XML file into PHP array. To convert the XML document into PHP...
Read more >
XML Array | How array work in XML with examples? - eduCBA
A multi-dimensional Array is created for a collection of elements. The arrays are done by creating functions by pairs. Many elements are collected...
Read more >
XmlReader.ReadContentAs(Type, IXmlNamespaceResolver ...
The current node is not a supported node type. ... If the data is typed and a string array is supplied to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found