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
2
votes
1answer
3k views

What is the more effective way to get array of data out of xml for d3 chart?

I am writing a small application that would interactively allow user for xml file manipulation with d3 interactive charts. My xml file has the following hierarchy : ...
4
votes
1answer
2k views

Sending an XML file to an SFTP site

I have a console application that basically retrieves XML content, writes to the XML file and sends the file to an SFTP site: ...
3
votes
2answers
295 views

Perl script for generating iTunes xml Metadata for MP3 CDs/DVDs

Many years ago, I wrote a script in Perl that was meant to create a cached metadata of MP3 files (in Apple's plist/XML format) which iTunes uses when you insert a CD/DVD full of MP3 files (the same ...
3
votes
1answer
854 views

String Interpolation / Word Matching with XML in C#

I'm working on a project where I need to map XML values to field names. Classic CS problem, I think I've got a pretty good approach but would like feedback. For example: ...
2
votes
1answer
103 views

Finding the right structure for my application

I have three different types of XML files (structure) which I would like to import into a database. Every hour a cronjob calls my import.php with a specific XML file type as a parameter. The import ...
3
votes
1answer
7k views

Scrolling in Horizontal ScrollView losing selection

When I chose an element from this HorizontalScrollView, I was setting focus to that element by calling: ...
1
vote
1answer
7k views

Parsing XML in C# .NET [closed]

I am working on a way to parse data using xml. The file that I am given contains lines that look like this: George | Washington | Carver or someone else can ...
3
votes
2answers
4k views

Generating .xml files based on .csv files

This reads in data from a .csv file and generates an .xml file with respect to the .csv data. Can you spot any parts where re-factoring can make this code more efficient? ...
5
votes
2answers
300 views

Using a monkey-patched XML parser to convert journal articles to ePub format

I am working on a project that involves XML parsing, and for the job I am using xml.dom.minidom. During development I identified several patterns of processing that I refactored into discrete methods. ...
3
votes
3answers
50k views

Better way to get the XML attribute value?

I have an xml file from which I want to extract the value of attribute custName from the very first child. The code below works where I am using the dom parser. Is ...
7
votes
3answers
621 views

Rigidness and verbose nature of XML parsing

I've been developing a simple console application in C++ using the TinyXML2 library, and I honestly can't help but feel what I'm doing is not very robust. Maybe that's just the nature of parsing XML (...
3
votes
1answer
137 views

XML schema for Database Unit Tests

I am attempting to develop an XML schema (XSD) to represent a set of unit tests for some code. (Specifically, I am testing Oracle PL/SQL stored procedures.) I would like to have something that ...
3
votes
1answer
589 views

Sencha touch with XML

Could you please review the following? My concern is XML parsing is hardcoded: ...
2
votes
1answer
667 views

XML to Windows.Forms.Keys List

It took me a lot of poking around and unit testing to get the code to look like it is right now. So I have a XML file which in part looks like this ...
2
votes
2answers
3k views

Parsing XML with double nested tags using mindom

I want to retrieve id and name per skill. It works but is it well done? I would like to stay with minidom but all advices will be appreciated. ...
3
votes
2answers
7k views

Parsing data from XML using Ruby and Nokogiri

I have a method that parses XML into an array of hashes. Here is the original XML: ...
5
votes
1answer
971 views

Recursive XML2JSON parser

I made a Python function that takes an XML file as a parameter and returns a JSON. My goal is to convert some XML get from an old API to convert into Restful API. This function works, but it is ...
1
vote
1answer
4k views

(More) efficient and elegant way to retrieve data from a dataset?

I have a DataSet with only two tables in it. The first table is a list of models (of products) with default parameters (settings), and the second table is a list of modules. A module is a product ...
2
votes
2answers
564 views

XML format for mp3 files

I'm developing a desktop app that will scan a user's system for mp3 files and send their whole collection to a website. I'm assuming the best file format for sending this data to a server would be XML ...
4
votes
1answer
124 views

DOMDocument field class

Here is the class: ...
2
votes
1answer
460 views

An XML stats page for my game

I am making a stats page for my Android game, and I have never really used the Android XML layout stuff, so I'm sure things are a little messy and strange. The layout ends up looking pretty good, and ...
4
votes
1answer
2k views

Parsing XML to create IList

Here's a class I created to parse XML to create an IList. It seems to me that this is something that will be done a lot in general by a lot of different programs. Is there a more standard way of doing ...
3
votes
2answers
203 views

Appendix answer key template

Goal: Extract all Appendix Titles If Appendix Title is Answer Key call custom solutions template If Not Answer Key call default appendix template XML: ...
2
votes
1answer
1k views

Using XML from web service with switch

Very simple requirements here: connect to web service check if account number exists if it exists update it if it does not exist create the account I have accomplished this with the code below I am ...
1
vote
1answer
135 views

Error handling data from XML document [closed]

I am getting information from an XML document and for the most part everything runs as it should. Occasionally, I get a php fatal error Call to a member function children() on a non-object. I have ...
5
votes
2answers
6k views

Checking and returning Xml from a byte array

I have a byte array in a C# program. I want to determine as quickly as possible if the content is Xml. If it's the case, I also want to return the Xml itself. By now I have this method : ...
4
votes
2answers
574 views

Transforming XML as it is being generated on a scanner

At work I've recently been tasked with creating an XSLT to transform some XML as it is being generated on a scanner. The point being to disregard some pages that we are not interested in for further ...
1
vote
1answer
154 views

How can I optimize my XSL file?

I am trying to learn to format XSL more efficiently. I can tell by the definition of duplicate variables and nearly identical templates that I did not create this efficiently at all. How could I ...
1
vote
1answer
519 views

Parsing an XML configuration file for network monitoring

I want to simplify this C code into different functions: ...
3
votes
1answer
360 views

Javascript XML Parser wrapper

I created an XML wrapper to easily access XML data. Please tell me what do you think about it. Performance Scalability Anything else... This is how you use it: ...
2
votes
1answer
2k views

Create Directed Acyclic Graph (DAG) from XML-Tree

I've written a program that creates the (minimal unique) directed acyclic graph from the tree structure of an XML-document. The program prints a Bplex-Grammar to cout. I'm interested in all kinds of ...
0
votes
1answer
5k views

Manipulate XML files in c#

I just finished my working code, but still want to improve it. I want to transform this input: ...
8
votes
4answers
15k views

Mapping the differences between JavaScript objects

The reason I want to do this is that the JavaScript objects are created from XML elements and if the element has changed I want to be able to detect that change in the JavaScript objects. So I wrote a ...
2
votes
3answers
6k views

Parse an XML file using objects / methods

So I spent a while this morning creating an xml parser in java which is part of a job interview. I would love to have some people tear it apart so I can learn from any mistakes that I made so I can ...
1
vote
2answers
169 views

Using Choose and Apply Templates with Mode, vs Complexless Template Matches

So I have a little XML (Sub)language, it has 3 elements of interest: para, point, and code ...
3
votes
2answers
10k views

XML schema parser

I've been working on a lightweight XML schema parser, and have what I think is a moderately clean solution (some parts helped out by previous questions I posted here) so far for obtaining all schema ...
2
votes
1answer
2k views

Converting NameValue pair entity to XML

I have the following code, to store a web service name value pair response into DB. I am saving it in xml column of DB. Kindly highlight the issues with this approach. Please note that the name value ...
6
votes
1answer
7k views

Convert elementtree to dict

Just needed a quick way to convert an elementtree element to a dict. I don't care if attributes/elements clash in name, nor namespaces. The XML files are small enough. If an element has multiple ...
7
votes
3answers
2k views

Handling various types of nodes when traversing a DOM tree

How to minimize the following code using java's features ... looking for some workaround with the switch-case statement I've seen several question regarding switch-case design pattern / best ...
6
votes
1answer
2k views

XML Schema for an XML representation of CSV

This is intended to be part of a generalised solution to the problem of converting any (with some minor restrictions) CSV content into XML. The restrictions on the CSV, and the purpose of the schema ...
2
votes
1answer
2k views

Loading XML and csv files to datatables at startup

Here is some code that I put together for an app I am working on that loads 2 XML files and a large CVS file to a dataset at startup. It runs fairly fast, but I would like a second opinion on what I ...
4
votes
2answers
3k views

Making a flat file

Source XML (since I haven't bothered with a schema): ...
2
votes
2answers
4k views

Loading config file from XML

After my question on StackOverflow, I've written code that should create a Config class from an XML file. XML loading is mixed with structures declaration and break ...
1
vote
1answer
2k views

Receiving an XML post and parsing

I need to receive an XML post then process all the data, and do whatever I need to do with the data. I could be receiving anywhere from 60 to 100 values. I know what all the elements are going to be, ...
5
votes
1answer
2k views

Survey program using JSF and Ajax

I'm new to AJAX and am trying to learn by myself with a small test: It's a survey with 3 questions. I would like to know if I'm using AJAX the correct way, before starting bigger projects. Here is ...
2
votes
1answer
1k views

Escaping XML to be used with SOAP [closed]

I'm attempting to escape ampersands from a string before passing to PHP's SimpleXMLElement->addChild() for use with some SOAP webservices, but I don't want to ...
1
vote
1answer
156 views

How can I make this XML gallery snippet prettier?

Everything works, i just want to know if i can change the way the xml tags are retreived. This way seems a bit bulky - but i could be wrong. Thoughts? ...
2
votes
2answers
385 views

Parse in currency rates of major cities

I'm creating a website that parses in currency rates of the three major cities listed below in the $cities array. ...
2
votes
1answer
340 views

Collection of XmlNode control

I have implemented the structure below at least 5 times, and it is getting cumbersome. Is there a better approach? Current code-segment implemented ...
3
votes
2answers
752 views

Configuring a currency converter to get exchange rate feeds for for multiple currencies

I'm trying to make my function more versatile by removing hard coded data. ...

1
5 6 7
8
9