XML (Extensible Markup Language) is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards.

learn more… | top users | synonyms

2
votes
1answer
19 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 ...
1
vote
0answers
16 views

Code review for javascript and sencha touch with XML

Hi could you please code review the following, my concern is XML parsing is hardcoded: Ext.Ajax.request({ url: storageDataItem.contentlink, success: function (response) { ...
0
votes
0answers
6 views

Parsing multiple same formatted xml items [migrated]

I have multiple items within my xml code I want to parse. I'm not quite sure of how to do it, any help would be greatly appreciated. Below is a snippet of my xml and python code and what I'm looking ...
2
votes
1answer
33 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 <FunctionKeys> ...
2
votes
1answer
40 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. # This is only part of XML that interesting me: # ...
3
votes
2answers
106 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: <rowset name="skillqueue" key="queuePosition" ...
4
votes
2answers
65 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
45 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
55 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
33 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: ...
1
vote
0answers
25 views

DOMDocument field class Python

What do you think of this class? Is this simple to understand how it works and what it does? Do you think it is good piece of code? class Field(object): """Class which contains logic of ...
0
votes
0answers
30 views

Reading HR-XML from DB

When I read a table with HR-XML, I tap into a view CREATE VIEW [dbo].[vwUser] AS WITH XMLNAMESPACES (DEFAULT 'http://ns.hr-xml.org/2007-04-15') SELECT UserID, login, passhash, ...
0
votes
0answers
18 views

Loading HR-XML PersonName into DB

I am currently loading HR-XML Person name with: <cffunction name="commit" returnType="boolean" access="remote"> <cfargument name="UserID" required="true" type="string"> <cfargument ...
1
vote
1answer
210 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
525 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
73 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: <appendix> ...
2
votes
1answer
132 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
71 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
270 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 : ...
2
votes
2answers
78 views

Reviewing and optimizing underperforming XSLT

At work I've recently been tasked with creating an XSLT to transform some XML as it is being genereated on a scanner. The point being to disgard some pages, that we are not interrested in for further ...
1
vote
1answer
76 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 ...
2
votes
1answer
250 views

How to split C code into functions

I want to simplify this C code into different functions: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <libxml/xmlmemory.h> #include ...
1
vote
0answers
86 views

Javascript XML Parser rapper

I created an XML rapper to easily access XML data. Please tell me what do you think about it. Performance Scalability Anything else... This is how you use it: var xml = new Xml(dataString); ...
1
vote
1answer
371 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
0answers
80 views

XML to JavaScript library design

I created a small library to parse xml to javascript. Can anyone tell me if the design is correct for a library? or if there is a better technique. I wrote a small Usecase example here. ...
0
votes
1answer
601 views

Manipulate XML files in c#

I just finished my working code, but still want to improve it. I want to transform this input: <item>asdf</item> <item>asdf</item> <item>asdf</item> to this ...
2
votes
3answers
228 views

How can you map 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
915 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
77 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 If a code occurs inside a para, point element I want to handle it for inline use, if not, i want to set it ...
1
vote
2answers
396 views

Help fix up my Python XML Schema parsing code

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
242 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 ...
3
votes
1answer
359 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 ...
3
votes
1answer
346 views

Please review my XML Schema for an XML representation of CSV

Please review my 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 ...
0
votes
1answer
698 views

vb.net code to load 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 csv file to a dataset at startup. It runs fairly fast, but I would like a second opinion on what I ...
1
vote
1answer
246 views

XSLT making a flat file

Ok source XML (since I haven't bothered with a schema): <?xml version="1.0"?> <ContactDetails> <Names> <FullName> Nicholas Example </FullName> <AltName ...
0
votes
2answers
657 views

load config file from xml

After my qeustion on stackoverflow, I've wrote code that should create Config class from xml file. Xml loading is mixed with structures declaration and break in a lot of small piecies however i'm not ...
1
vote
1answer
487 views

Parsing XML - Did I do this efficiently?

So 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 ...
3
votes
1answer
218 views

I'm trying to escape some XML to be used with SOAP

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 double escape them. I'm getting these ...
1
vote
1answer
77 views

Refactoring xpath input desgin

I want to design API which could handle XPATH input from user. Currently i have model the XPATH input in following way, public interface ICondition { String getConditionString(); } public class ...
1
vote
1answer
128 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? var d = 0 ...
1
vote
1answer
186 views

Trying to refactor method to remove argument added to URL

Background: I'm creating a website that parses in currencies rates the three major cities listed below in the $cities array. I'll explain my code as I go along. <?php // Feed URL's // ...
2
votes
1answer
176 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 public XmlNodeList Templates { get { return ...
3
votes
2answers
250 views

Trying to remove hard coded data from a function in PHP

I'm trying to make my function more versatile by removing hard coded data. function get_currency_rate($currencySource) { if (isset($currencySource)) { $feed = $currencySource; } else { ...
3
votes
2answers
440 views

First Java Swing program

This is my first forray into Java Swing and it's not exactly pretty. I have quite a few methods, and a lot of stuff going on (XML parsing, data conversion, etc) and I'm just wondering what kind of ...
0
votes
1answer
115 views

Python xml schema parsing for simpleContent and simpleTypes

I am writing a few python functions to parse through an xml schema for reuse later to check and create xml docs in this same pattern. Below are two functions I wrote to parse out data from ...
4
votes
2answers
2k views

Better way to parse XML in Python

I'm sure there must be a better / simpler way of doing this.... The aim of this code is to return an object which contains all of the movies. Where attributes are not found, they need to return ...
2
votes
1answer
107 views

filter out password in xml string

We're storing the xml communications with an external service in a text in the db and in a before_create I've got the following: # filter opera password def remove_password! ...
2
votes
4answers
168 views

Improving search through XML file

I'm working on a function that extracts information from an XML document and compares to what the user has typed in. Can you suggest any ways in which I can improve it? The variables in the XML file ...
1
vote
1answer
287 views

Quickly put together a reusable configuration reader for Java. Looking for suggestions to improve

This is related to a question I posted on StackOverflow Java: reading Xml configuration and applying to an object, what's a lightweight, simple solution. The consensus was to use JAXB, which is what ...
2
votes
2answers
2k views

Importing XML to a database using LINQ to Entities

I am importing XML data to a MySql database using LINQ to Entities. The data represents which students are in which classes, and looks like... <studentClassesData> <studentClassEntry> ...

1 2