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

learn more… | top users | synonyms

1
vote
1answer
22 views

Manage XML file with custom XmlFileHandler class

This post is a follow up question. The purpose of this class should became clear without any further explanation. Raise your hand. If not, then I will have to improve the naming/structure. I would ...
8
votes
4answers
97 views

Check if XmlNode with certain attribute exists and create XmlNode if not

I'm not going to explain the purpose of the code provided below. If you do not understand it, i know that i have to improve it (naming, structure etc.). I would like to know how to improve this code ...
6
votes
1answer
50 views

Extraction of data from Flickr

I'm crawling Flickr for data for my university research project. However it's very slow and I'm not sure what it is exactly. It could be the FileWriter slowing it ...
8
votes
2answers
72 views

Comparing Server Version Number History

I have this code that compares all version numbers of servers. (The version numbers are stored in an XML file) Before the code would compare the current version number with the previous. This caused ...
5
votes
3answers
82 views

Converting KML/XML to Javascript

So, I have the boundaries of every states in the US, from the google map KML file. This KML file is actually a XML file. I'm converting this file to a JS file compatible with google map in order to ...
3
votes
1answer
44 views

Parse XML using Python XML eTree

I am a high school intern, and I am trying to parse my mentor's code so that he can read in an XML file and call simple methods to edit or get information from his XML file. I was hoping someone ...
6
votes
1answer
68 views

Dividing the screen in two halves using LinearLayout

I want to divide the screen in two halves. The layout is locked on portrait mode. The top half will have one button and the bottom half will have many buttons. That's why I choose this division, since ...
3
votes
1answer
64 views

Parse needs to be more efficient

I will preface by saying that this data set is much larger than what I have here. I'm having to loop through an XML file to get data and display it on a site with jQuery. I have to use jQuery because ...
3
votes
1answer
59 views

Best practice to create XML messages with DOMDocument class in PHP

I want to create XML messages for webservice communication. These messages should be created from a pool of reusable elements. Therefore I have created different classes. A "factory" class, that only ...
5
votes
1answer
61 views

Anonymous methods, factory methods, threading, and XML input

I have an application which retrieves data from a (potentially) very large XML file. A combination of XMLReader and XDocument seemed to be the only way I could manage the entire thing the way I ...
5
votes
3answers
299 views

Client Sends XML, Server Parses XML, Queues Up and Executes Commands

I recently had a Java interview where I was asked to write a client-server application. I don't code primarily in Java, but with my preliminary Java knowledge, I thought I built a reasonable working ...
2
votes
1answer
15 views

XML Schema File that validates my XML File

I just want to know if my schema file is correct: XML File: ...
3
votes
2answers
130 views

PHP Weather class

I am kind of new to object orientation in PHP and I need some experts feedback. This class fetches the weather from this URL. It grabs the weather, temperature and an icon from the current hour. ...
4
votes
2answers
100 views

Dynamic Storing Objects from XML in RPG

I would prefer if more experienced users could give pointers on how I can optimize and think better when writing code. If you are unfamiliar with unity3d, ignore the use of UnityEngine, the heritage ...
10
votes
4answers
194 views

XmlCmdBuilder - doing away with inline xml

I have to work with a 3rd-party API that allows me to define and execute "commands", using XML. Since I don't like seeing mixed abstraction levels, I managed to remove all the inline XML / string ...
0
votes
1answer
45 views

Formatting an inventory of parts

There is a text file formatted this way. 51689299 4719 Medium Azure Riding Cycle 51689345 4720c01 Trans-Clear Wheel & Tire Assembly In real ...
2
votes
2answers
104 views

A query on Hibernate database design

I am writing a simple web application where I have a User entity and set of pre-defined questions to be answered by the User. The answers provided by the users for these questions would need to be ...
3
votes
3answers
104 views

Small function for getting character value

I want to extract some values in i-commas(") from lines like this: <P k="9,0,1" vt="191" v="100.99936" z="" /> Example: ...
2
votes
1answer
95 views

Best practice for storing arbitrary form data

I am currently storing form data in an XML format ...
5
votes
3answers
169 views

Proper and elegant way of Building a XML Document

I need to build the following XML document ...
0
votes
2answers
82 views

Reducing number of blank spaces

This program takes blank spaces before some chars like > < />, and if there is more than one blank space in the line, it will reduce to one. ...
2
votes
2answers
115 views

DOM parser implemented from scratch

I have implemented a DOM parser. I would like any comments for optimizing, improving, and making the code coherent to best coding practices. ...
1
vote
1answer
79 views

Conditional assignment in XSLT?

I've written some XSLT where I want to assign values to some variables. Depending on whether or not a condition is met, I want the variable to be populated with a computed value and I want it to have ...
0
votes
0answers
40 views

Selecting nodes how-to

I'm working on a tool to help me work with XML documents easier, and this function is at it's hart of selecting nodes based on arbitrary criteria. I forged it to accept a filter callback, Node to ...
1
vote
1answer
208 views

Code review on an API wrapper in C# wanted

I'm looking for remarks on pretty much anything. This has been my first project that's meant for use by others and I'd like to have it as clean as possible. I will post the main source code here but ...
0
votes
1answer
80 views

Better SimpleXML parsing method

I am trying to parse this XML file. I have the extension and I need to get the description, icon, and class from the XML. My code works(ish) (I know how to continue from where I am), but it doesn't ...
2
votes
3answers
510 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 : ...
3
votes
2answers
136 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
266 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: ...
0
votes
1answer
808 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 ...
2
votes
0answers
516 views

Is there a better way to convert a MongoDB BsonDocument to XML using C#?

Leaving aside the slightly dubious nature of the request (it's a feature I have to honour, regardless of whether I agree with it, and I'll never be reversing the conversion process), I have devised ...
4
votes
1answer
165 views

When is (if ever) monkey-patching acceptable? Is there a better solution to this?

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
2answers
3k 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
132 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
77 views

How can I make my XML schema robust?

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
148 views

Sencha touch with XML

Could you please review the following? My concern is XML parsing is hardcoded: ...
2
votes
1answer
274 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
1answer
231 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
609 views

How would one more elegantly parse data from XML using Ruby and Nokogiri?

I have a method that parses XML into an array of hashes. Here is the original XML: ...
4
votes
1answer
220 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
126 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
82 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 ...
1
vote
0answers
79 views

Mapping fields and multiple values with XML

I need to design an XML file that would map fields and field values of two objects, say A and B. Fields are mapped one-to-one and values - many-to-one. So far I could think of this design: ...
3
votes
0answers
52 views

DOMDocument field class

Here is the class: ...
1
vote
1answer
295 views

An XML stats page for my game

So 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, ...
4
votes
1answer
709 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
153 views

XSLT/XPATH Code Optimization

Level: Beginner Goal: 1- Extract all Appendix Titles 2- If Appendix Title is Answer Key call custom solutions template 3. If Not Answer Key call default appendix template XML: ...
2
votes
1answer
250 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 ...
1
vote
1answer
97 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 ...
6
votes
2answers
792 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 : ...