Questions tagged [xml-parsing]

An XML parser goes through text documents containing XML trees and allows the information in the hierarchy to be used. Use this tag for problems implementing an XML parser or generated by the use of an existing parser in a given language.

An XML parser goes through text documents containing XML trees and allows the information in the hierarchy to be used. Use this tag for problems implementing an XML parser or generated by the use of an existing parser in a given language.

An XML parser converts an XML document into an XML DOM object - which can then be manipulated with JavaScript. All modern browsers have a built-in XML parser.

The XML document specification places requirements on what an XML processor must do and not do, but the application is outside its scope. The processor (as the specification calls it) is often referred to colloquially as an XML parser.

13856 questions
23
votes
2 answers

WordPress WXR Specification

I'm trying to find a spec for the WordPress WXR import/export standard and I'm unable to find any official documentation from WordPress on the standard. Does anyone know of an official resource that could tell me exactly how to produce a WXR file so…
Cord Blomquist
  • 621
  • 5
  • 7
23
votes
5 answers

Parse XML file into Python object

I have an XML file which looks like this: some filename.mp3 Gogo (after 3.0) 131 joint stereo 00:02:43 5,236,644
Felix Dombek
  • 13,664
  • 17
  • 79
  • 131
23
votes
5 answers

What does parsing XML mean?

Can someone please explain to me what parsing XML means? And what does an XML parser do in general?
dwyane
  • 317
  • 1
  • 4
  • 10
23
votes
1 answer

How to use XmlPeek task?

I've read in the MSDN MSBuild Task Reference about XmlPeek task at http://msdn.microsoft.com/en-us/library/ff598684(v=VS.100).aspx but I cannot use it in my MSBuild script. If you have used this before, please show me how!
Nam G VU
  • 33,193
  • 69
  • 233
  • 372
23
votes
3 answers

How to convert XML to JSON using C#/LINQ?

I have the following XML file that I need to convert to JSON in the server. Initially I thought I would convert it to a Dictionary and then use the JavaScriptSerializer to turn it into JSON but since each column could have a different value type, I…
Farhad-Taran
  • 6,282
  • 15
  • 67
  • 121
22
votes
1 answer

How to prevent XML parsing errors being written to System.err (stderr)?

I am writing some unit tests that are deliberately passing bad strings to the Java DOM XML parser. E.g. DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); String message_xml = ""; //…
jfritz42
  • 5,913
  • 5
  • 50
  • 66
22
votes
1 answer

Codable and XMLParser in Swift

Using the new Swift4 Codable protocol works well for JSON-decoding (as explained here or here or in many other contributions). However, as it comes to XML-parsing, I couldn't find any information on whether this Codable protocol could also be used…
iKK
  • 6,394
  • 10
  • 58
  • 131
22
votes
6 answers

Parsing XML file containing HTML entities in Java without changing the XML

I have to parse a bunch of XML files in Java that sometimes -- and invalidly -- contain HTML entities such as —, > and so forth. I understand the correct way of dealing with this is to add suitable entity declarations to the XML file before…
Johannes Ernst
  • 3,072
  • 3
  • 42
  • 56
22
votes
3 answers

validate a xml file against a xsd using php

how to validate a xml file against a xsd? there is domdocument::schemaValidate() but It does not tell where are the errors. is there any class for that? does it have any worth making that parser from scratch? or is it just reinventing he wheel,
varuog
  • 3,031
  • 5
  • 28
  • 56
21
votes
2 answers

How to get XML tag value in Python

I have some XML in a unicode-string variable in Python as follows: count
kalaracey
  • 815
  • 1
  • 12
  • 28
20
votes
3 answers

Parsing XML / RSS from URL using Java Script

Hi i want to parse xml/rss from a live url like http://rss.news.yahoo.com/rss/entertainment using pure Java Script(not jquery). I have googled a lot. Nothing worked for me. can any one help with a working piece of code.
Arun Kumar Munusamy
  • 871
  • 1
  • 10
  • 28
20
votes
6 answers

How to parse XML from URL with Node

I am using node-xml2js to parse XML. I am having trouble parsing XML from a URL. I've used this SO answer as a model. But when I use the code below, I get null as the result. Any thoughts on what I'm doing wrong? UPDATE: I've updated the url for the…
Ken
  • 3,091
  • 12
  • 42
  • 69
20
votes
3 answers

How to select multiple nodes in different levels?

Having this (simplified) XML: Poly 1
Alejandro García Iglesias
  • 16,222
  • 11
  • 51
  • 64
20
votes
3 answers

AJAX / Jquery XML parse

I try parsing the following type of XML (data from getMembers.php): 3422345 Bill Gates 232311 Bob Barker And I use the code…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
19
votes
2 answers

Purpose of XMLString::transcode

I don't seem to understand the purpose of XMLString::transcode(XMLCh*) and XMLString::transcode(char*) , because obviously I don't understand the difference between XMLCh* and char*. Can someone please make things clearer for me ?
Joy
  • 1,707
  • 7
  • 29
  • 44