Questions tagged [xml]

Extensible Markup Language (XML) is a structured document format that defines human- and machine-readable encoding rules.

Filter by
Sorted by
Tagged with
3
votes
2answers
25 views

Handle missing children nodes when parsing XML into a dictionary

I work on a code-base that uses xml to set up problems and specify model parameters. I've created a script that I run in tandem with our code. This script will ...
0
votes
1answer
40 views

How do a research in all xml file for gived id value?

I have a xml file so formed: ...
3
votes
0answers
17 views

Organizing and accessing data in xml database - VB.Net

So I made an XML database for my music player where I store songs data (title,artist,album,genre,year) the code for generating the database is working but slow as heck, the code works as following ...
5
votes
1answer
66 views

Refactoring a class that counts xml dom nodes and caches the result

I saw this entertaining talk by: Bob Martin on clean code and started refactoring a relatively simple class today. I am, by no means, an expert on coding and still learning a lot every day, so I want ...
2
votes
1answer
35 views

Iteration over an XDocument based on some existing elements and conditions

I wrote this piece of code which works as expected: ...
2
votes
2answers
57 views

Parse XML data and update values of each node's children

The code below iterates through the nodes of an XML file and updates values based on a Regex expression in the rule child node from an XPath expression. XML is ...
3
votes
2answers
42 views

Powershell XML search performance

I am working on a utility to manage shared content libraries for Work from Home scenarios. Basically I have libraries of thousands of Autodesk Revit family files, and I want to host those files on AWS ...
3
votes
1answer
41 views

XML Tree Reformatter requested code. C#

So this is a post as per request in a different post on stack overflow: https://stackoverflow.com/questions/62412713/why-does-my-c-sharp-xml-code-only-work-when-i-enumerate-variable-enumerable. The ...
2
votes
1answer
88 views

Import huge XML data set into MongoDB while parsing data

I am currently working with the Stack Exchange Data Dump - to be more precise - with the dumped Posts.xml data set from Stack Overflow. What am I trying to achieve?...
1
vote
2answers
30 views

Python function to find specific regex in the text of an XML document

I'm writing a code that, starting from an XML file: stores the index of child elements of a tag and the child elements as key, values in a dictionary (function ...
4
votes
1answer
63 views

Scheduled Notifications (First Android App)

I'm unbearably happy to present my first Android project, which collects market index data (three Asian indices) and fires a notificaiton every Wednesday, Thursday and Friday at 7:30 AM displaying the ...
2
votes
1answer
39 views

Function to parse an XML and find specific regex considering the size attribute of the document

I'm writing a code that, starting from an XML file: stores the index of child elements of a tag and the child elements as key, values in a dictionary (function ...
2
votes
1answer
99 views

How to divide this Python code into different functions?

I'm making a code that, starting from an xml file: stores the index of child elements of a tag and the child elements as key, values in a dictionary; deletes keys whose values contain a certain ...
1
vote
0answers
22 views

XML and XML schema definition

I want to define the XML schema for an XML representation of shopping order data. See following requirements The XML representation of order should contain order id, description, request date, ...
0
votes
0answers
39 views

Custom view to select a value

I created a Custom view to select a value. I use horizontal Recyclerview to select an integer value and 2 buttons that decrease or increase the values. Could you consider the code and tell how it can ...
3
votes
1answer
57 views

XML attribute analysis

To begin, I have an XML file at /Users/gaze/lab/lab/gpib_lib/out.xml that contains lines like... ...
1
vote
0answers
22 views

Improving loop through xml files ad add to DF

With this code, i loop through similar xml files and add them to a DataFrame. How can i make this code better so it is more pythonic? ...
5
votes
0answers
112 views

Extract data from API using VBA & XML (Performance)

EDIT: Added a block with the raw code at the bottom (suggested by a friendly user) First post here. I sincerely hope that I am doing everything by the book. Also, I want to thank you in advance for ...
9
votes
3answers
202 views

Performance - Read large amount of XMLs and load into single csv

I am dealing with a large amount of XML files which I obtained from here https://clinicaltrials.gov/ct2/resources/download#DownloadAllData. The download yields around 300.000 XML files of similar ...
6
votes
3answers
396 views

Make my XML Parser in Java using WoodStox run faster and use less memory, or just generally better

I have an XML Parser in Java using WoodStox that I wrote. This parser is going to be parsing through extremely large files, could be 5+GB. The goal of the parser is to convert a nest XML file into a ...
1
vote
1answer
76 views

File size when parsing XML

The code below takes a directory of XML files and parses them into a CSV file. Right now parsing around 60 XML files is fast and the output is a CSV file that is around 250MB. That is a really big ...
1
vote
0answers
354 views

Escaping invalid XML characters (e.g. for the Java DOM API)

I want to save and load an arbitrary Java String in a Text node in a XML file using the Java DOM API. The ...
0
votes
0answers
21 views

XML schema for a basic blockchain

I recently read this article which runs through a very basic implementation of a blockchain for cryptocurrencies using Kotlin. For no real reason I decided to try and write an XML schema which defines ...
1
vote
1answer
111 views

Starting an activity after 1000ms from a splash screen with Runnable and Handler().postDelayed

I have implemented a splash screen which is the main activity of my Android app. This splash screen shows an image, and after 1000ms there is an animation to show another activity's layout. The code ...
3
votes
0answers
48 views

Reduce cluttering in a VPN initialization dance implementation (html, xml extraction and api calls) in Go

I'm still rather new to Go and I wanted to convert a part of a Python script I wrote a while ago to perform the VPN initialization dance (basically a set of API calls + parsing to fetch an auth cookie ...
6
votes
1answer
165 views

Slow parsing of mutiple XML files to CSV

The code below is written as part of a parser, which files would be also added here: XMLParser, parser, Name, GenericElement, attrib It reads an XML files from a folder, turn them into a dataframe ...
4
votes
1answer
117 views

XML parser + bs4 combo

I just wrote a short function to parse SO jobs XML feed and return dicts containing information about each job entry. Now, each job entry page is visited to grab info not present in the xml feed (...
4
votes
0answers
53 views

Enables markup to instantiate objects, call methods, and generate HTML

I'm looking for a code review for the package PXP. https://github.com/hxtree/PXP/ PXP enables markup to instantiate objects, call methods, and generate HTML. It works similar to a server-side ...
0
votes
1answer
35 views

XML DTD for downloadable stories [closed]

I want to make sure that I am writing the code correctly and fully understand what is needed. My biggest concern is what tags to use, (? ...
0
votes
1answer
72 views

Reduce the execution time utilizing two apis

I am new to python. I have been given a task to verify the data from 2 apis which give similar data but in different format i.e. Json and XML. I have written the code but it is taking too much time to ...
2
votes
1answer
69 views

Modern HTTP-Requests for login/register system

I am working on a login/register system and want the register and log in process as smooth as possible. One way of making it smoother is in my opinion to make a multi-step login/register. What I ...
0
votes
1answer
42 views

Convert generic class into XML string of specific structure

There is a need to have a specific structure of XML string when interacting with 3rd party system. Here are two examples: ...
3
votes
0answers
53 views

OOP parsing for DB dump XML Python

I am parsing large XML (DB dump). So, the content looks like many different objects with their properties and dependencies (foreign keys). My way to do it - using lxml.etree (iterparse): ...
2
votes
0answers
23 views

Changing opacity of KML file (with icon linked) fetched in the Leaflet Map

I have a solution for making the .kml file transparent in the Leaflet Map. The working code looks like this: ...
4
votes
1answer
60 views

Rendering the AuthorName using the DOMParser to read XML

I need to concatenate the LastName and Initials and all of that authors affiliations. Is there a better way or faster way to do ...
3
votes
1answer
263 views

Nested for-loops in xml parsing

I wrote program that reads and processes xml files submitted by external users. The part of the code in question iterates over xml node's children, appends a dictionary - a future row in a table, and ...
5
votes
1answer
414 views

Regex XML validator

I have written a Regex to validate XML/HTML, along with any attributes. It aims to: Match any XML-like text Not match any unclosed tags Adapt for any spacing, newlines, etc. Be as generous as ...
2
votes
0answers
102 views

F# XML Generation in .NET Core: XmlSerializer or XmlProvider

I am working on SEPA XML generator in F#. I developed two solutions that are roughly equivalent, one relies on the XmlSerializer while the other relies on ...
4
votes
2answers
151 views

Reading Data from XML and storing them into SQL Database

I am developing a C# Windows forms application. In that, I am reading data from XML which is coming from a web API and storing that XML data into SQL database. I am able to achieve this. But my only ...
3
votes
1answer
60 views

Counting bigrams in XML files in a directory tree

I've written this code in Scala that extracts bigram statistics from the Reuters dataset. It puts the statistics in a Map[String, SortedMap[String, Int]]. For ...
1
vote
0answers
26 views

Console app to get XML from API and save to database

I am making a small console app to get XML from an API and then save the data to a database. While this project was not created via test-driven-development, I have tried to make it such that tests can ...
1
vote
1answer
510 views

Grid of radio buttons in Android

I want to display multiple radio buttons in a layout with multiline style as an item inside a RecyclerView. Look at the code I provided below and suggest how I can ...
1
vote
1answer
80 views

Python xml-parsing script

I have a Python code that deals with parsing xml-feeds of footwear online stores. I want to let the code look more professional for the sake of optimal reusability for other programmers. It includes ...
2
votes
1answer
77 views

Parse through an XDocument efficiently and match values to matching object

Minimum viable test program: ...
1
vote
0answers
165 views

Extracting attribute value from multiple XML nodes in golang?

I'm attempting to parse an SVG file to get all of the colors that are present in the file. SVGs are XML based and their structure can vary a bit. For example: ...
6
votes
2answers
259 views

Parse dblp XML and output sums of publications grouped by year and type

The following Go program parses a gzipped XML file (available here) which contains bibliographic information on computer science publications and has the following indicative structure: ...
0
votes
1answer
88 views

XQuery compare order of two sequences

I have written a function in XQuery 3.0 (using BaseX) which tests a base sequence against a test sequence, with the goal of determining if the items in the test sequence appear in the same order as ...
4
votes
1answer
68 views

Deserializing an XML Object without Reflection / Meta-Programming

I need to deserialize an XML file, without using any sort of "reflection" (or meta-programming). Instead, I need to do it via a raw object, that knows of it's structure and can properly identify and ...
2
votes
1answer
91 views

Calendar holidays to XML

We are writing program which makes XML file which is a calendar with all free days in Poland (Saturdays, Sundays, and all hollidays). We tried to write this code as readable as possible so probably no ...
3
votes
0answers
168 views

Generic object-to-XML mapper

This code is part of a larger mapping library I'm working on to address some business concerns of transforming data. I was inspired by mapstruct in Java, but opted for users to annotate / add ...

1
2 3 4 5
9