Skip to main content

Questions tagged [xml]

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

42 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
2k 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 ...
Peder C's user avatar
  • 59
5 votes
0 answers
5k views

Merging multiple app.config files

I have a few complex app.configs that I constantly manage to break. This often costs me a lot of time until I find the error/typo. To prevent such situations in future, I wrote a simple utility that ...
t3chb0t's user avatar
  • 44.3k
5 votes
0 answers
200 views

Error Handling for XML parser

I have the following Ruby code, which parses an XML document sax style (it's a very simplified version): ...
23tux's user avatar
  • 227
4 votes
0 answers
429 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 ...
Natalie Perret's user avatar
4 votes
0 answers
111 views

A config file handler I made for a game with Monogame

The reason I used fields instead of automatic properties is because I am using tryparse which can not use properties... I know the Title setting could have been an automatic property but I decided to ...
Whackatoe's user avatar
4 votes
0 answers
4k views

Creating Android layout with GridLayout

I'm trying to create a Layout with two columns which are next to each other (I'm accomplishing this behavior with a LinearLayout). Inside each column, I have two TextViews and two Buttons, which I ...
Larpee's user avatar
  • 143
4 votes
0 answers
490 views

Recursive function to compare XML files using MSXML DOM

I have put together this function which compares two XMLs. On debugging, I found out that there are lot of useless loops which might cause performance problems for me if the files to compare are very ...
Pankaj Jaju's user avatar
3 votes
0 answers
42 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 ...
Anes Hamdani's user avatar
3 votes
0 answers
59 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 ...
Natalie Perret's user avatar
3 votes
0 answers
66 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): ...
Jane's user avatar
  • 131
3 votes
0 answers
652 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 ...
Igneous01's user avatar
  • 131
3 votes
0 answers
97 views

Parsing XML to get report job id and save final XML to file from an API

The objective of this code is to contact a server with a reporting API and run the specified report from the user generated configuration file, once the report has been requested to server responds ...
Marct's user avatar
  • 31
3 votes
0 answers
836 views

Easily Create XML within PowerShell

The purpose of this PowerShell function is to make it simpler to output XML in a given format. For my use case, that XML did not have a schema associated, so I've not implemented any namespace logic; ...
JohnLBevan's user avatar
  • 1,409
3 votes
0 answers
368 views

Stylishly saving source

Simple tool to save a web page's source. A result of trying to learn and apply an MVC approach. The FXML is generated via Scene Builder, but included for completion. I welcome any general feedback on ...
Legato's user avatar
  • 9,829
3 votes
0 answers
380 views

Hourglass path in SVG for Android

I've created my first Android drawable, a hourglass shaped image, and I'm curious what can be improved with it. It seems weird having to use 4 paths, but I couldn't get it to work any other way. ...
TMH's user avatar
  • 499
3 votes
0 answers
66 views

URL fetcher and parser for XML feeds

Here is a program that will parse and print XML feed URLs. I want to reuse most of it to add post date to each link. This adds a new concern of CLI and output formatting on top of parsing and (poor) ...
sevo's user avatar
  • 291
3 votes
0 answers
111 views

Use of die() in flow control - proper and sensible?

Designed for OpenCart, vQmod places or replaces bits of code based on XML files. The following three versions of the code achieve the same goal, which is to ...
MikeiLL's user avatar
  • 630
2 votes
0 answers
87 views

Bot gets data of sitemap, parses it and send message to Telegram channel

UPDATED - 25-12-2021 Summary: Renamed start.py --> bot.py Modified a lot of code in bot.py Modified code in sitemap.py Created init.py Check the update code in the bottom of this question. I ...
sincorchetes's user avatar
2 votes
0 answers
1k views

Read compressed XML file inside ZIP and parse data as fast as possible

I am trying to read and parse an XML file inside of a ZIP archive as fast as possible. The XML file is roughly 85GB in size, so I know for a fact that I/O also plays a role here, as I need to ...
MortenMoulder's user avatar
2 votes
0 answers
85 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: ...
Geographos's user avatar
2 votes
0 answers
64 views

XML graphing, and attribute existence

I have been working on my own form of validation for XML other then xpath, as a toy project. First off, I use this class to add Validations to the graph to check for and validate they exist. ...
BanMe's user avatar
  • 75
2 votes
0 answers
472 views

Ruby Hash to XML

I've just made this "serialization" module in Ruby that takes a hash and outputs a XML string. ...
vinibrsl's user avatar
  • 647
2 votes
0 answers
42 views

XML Input Parser To Load Test Data into Dev Database

I wrote an XML input transformer to ingest data from test directory and essentially store anything into a DB table. I attempted to make this as generic as possible. I'm new to Java and also realize ...
Ryan's user avatar
  • 21
2 votes
0 answers
45 views

Parse an XML and retrieve zero or one attribute per level starting from a leaf

I need to extract from a large XML file some information: 0 or 1 attribute per tag Trigger on a leaf element So I wrote this Python code: ...
nowox's user avatar
  • 1,099
2 votes
0 answers
4k views

Simple API testing framework for testing of SOAP xml requests

I have a need to try to automate the testing of a large Web Service with an XML API interface. The framework takes the form of a Mavenised Java project. The usual maxims apply: must be highly ...
Steerpike's user avatar
  • 121
2 votes
0 answers
496 views

SVG filtering an image to stepped alpha grayscale

I have a variety of images that will be used in a style intended to mimic a dot-matrix LCD. In a previous version, I rendered these images using a program and essentially ended up with a duplicate of ...
Niet the Dark Absol's user avatar
2 votes
0 answers
234 views

Opening the same CSV file in two different ways in order to transform data in one column and update original CSV using Python

I have the following functions and accompanying script. The purpose of these is is to extract XML data from one CSV column (one XML document for each row), and then transform it into a dictionary (...
ahlusar1989's user avatar
2 votes
0 answers
821 views

XML to JTree app needs Model/View/Controller refactoring

I'm developing a JavaSE-1.7 Swing application that displays XML files as a JTree. This will be the base for further work, e.g. filtering nodes. My questions, as a ...
rypel's user avatar
  • 121
2 votes
0 answers
619 views

Class derived from TXmlIniFile to save/read to/from XML

I have created this unit containing a class derived from TXmlIniFile. This class uses the common TCustomInifile methods to write to and read from an XML file. It comes from an idea of Chris Rolliston ...
user1580348's user avatar
2 votes
0 answers
321 views

Drop-down list with 14 options of RSS feed dates

The goal of this code is to create drop-down menu where there are 14 options on the list. Those 14 options are the dates that an RSS feed were last updated. The URLs for the feed have the query ...
Laura M's user avatar
  • 21
2 votes
1 answer
93 views

Cloning Distinct XML structures without data in PHP

I struggled for the last couple days on this question and finally came up with a solution. But it's got so many loops I get dizzy just looking at the code - from recursive functions with loops to ...
Jeff Puckett's user avatar
1 vote
0 answers
998 views

Extract series of XML elements' values into an array

This code needs to extract data from in XML file. Specifically it needs to iterate over it, looking for a node called CHARGE_CODES that repeats over and over and ...
gbasic's user avatar
  • 11
1 vote
0 answers
104 views

Improving speed of parsing XML file

...
adb12's user avatar
  • 11
1 vote
0 answers
723 views

Parsing a large XML file and storing in Postgres efficiently using Pythonic code

I have a bunch of large XML files that I have to parse and store in Postgres. I have done a lot of procedural code but I want to think in terms of objects and reap the benefits. Any help in that ...
ThinkCode's user avatar
  • 111
1 vote
0 answers
34 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, ...
Ashish Pawar's user avatar
1 vote
0 answers
44 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 ...
Destroyer's user avatar
  • 477
1 vote
0 answers
52 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? ...
guialmachado's user avatar
1 vote
0 answers
2k 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 ...
stonar96's user avatar
  • 111
1 vote
0 answers
670 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: ...
Abe Miessler's user avatar
1 vote
0 answers
348 views

Converting Cisco IOS output to XML

The INPUT FILE is created by a script that runs "show interface description | i FN" against each of my routers. Once I have that file, my PYTHON SCRIPT below, parses the INPUT FILE for each of the ...
William Hickey's user avatar
1 vote
0 answers
3k views

Performance increase on Spring integration

I have been running a program to read a file having 6 million rows and validate each line and write the string containing the validation message to an output file. I am using spring integration to ...
Vinod Madan's user avatar
0 votes
0 answers
38 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 ...
Michael Brandon Morris's user avatar