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
2298
votes
31 answers

How do you parse and process HTML/XML in PHP?

How can one parse HTML/XML and extract information from it?
RobertPitt
  • 56,863
  • 21
  • 114
  • 161
882
votes
29 answers

How to display HTML in TextView?

I have simple HTML:

Title


description here

I want to display HTML styled text it in TextView. How to do this?
UMAR-MOBITSOLUTIONS
  • 77,236
  • 95
  • 209
  • 278
383
votes
6 answers

What XML parser should I use in C++?

I have XML documents that I need to parse and/or I need to build XML documents and write them to text (either files or memory). Since the C++ standard library does not have a library for this, what should I use? Note: This is intended to be a…
Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
300
votes
2 answers

The best node module for XML parsing

As far as XML parsing is concerned, which is the best node module, that I can use for XML parsing?
Manoj
  • 3,083
  • 2
  • 15
  • 5
268
votes
7 answers

What is the difference between SAX and DOM?

I read some articles about the XML parsers and came across SAX and DOM. SAX is event-based and DOM is tree model -- I don't understand the differences between these concepts. From what I have understood, event-based means some kind of event happens…
user414967
  • 5,225
  • 10
  • 40
  • 61
254
votes
7 answers

Parsing HTML using Python

I'm looking for an HTML Parser module for Python that can help me get the tags in the form of Python lists/dictionaries/objects. If I have a document of the form: Heading
ffledgling
  • 11,502
  • 8
  • 47
  • 69
223
votes
15 answers

Convert XML String to Object

I am receiving XML strings over a socket, and would like to convert these to C# objects. The messages are of the form: 1 stop How can this be done?
Steve
  • 53,375
  • 33
  • 96
  • 141
195
votes
7 answers

Parsing XML with namespace in Python via 'ElementTree'

I have the following XML which I want to parse using Python's ElementTree:
Sudar
  • 18,954
  • 30
  • 85
  • 131
152
votes
6 answers

Best XML Parser for PHP

I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality. I recently saw SimpleXML but I haven't tried it yet. Is it any…
Murat Ayfer
  • 3,894
  • 6
  • 29
  • 26
117
votes
1 answer

SyntaxError of Non-ASCII character

I am trying to parse xml which contains the some non ASCII cheracter, the code looks like below from lxml import etree from lxml import objectify content = u'
Order date                            :…
OpenCurious
  • 2,916
  • 5
  • 22
  • 25
116
votes
41 answers

Is XSLT worth it?

A while ago, I started on a project where I designed a html-esque XML schema so that authors could write their content (educational course material) in a simplified format which would then be transformed into HTML via XSLT. I played around…
nickf
  • 537,072
  • 198
  • 649
  • 721
105
votes
4 answers

Are line breaks in XML attribute values allowed?

I realise that it's not elegant or desired, but is it allowed (in well-formed XML) for an attribute value in an XML element to span multiple lines? e.g. Yeah I realise there's…
CodeAndCats
  • 7,508
  • 9
  • 42
  • 60
104
votes
2 answers

The reference to entity "foo" must end with the ';' delimiter

I have Google checkout sandbox generated HTML code which works fine in HTML page. When I put the same code in XHTML page, it throws the below exception: the reference to entity "w" must end with the ';' delimiter It's referring the request…
Adnan
  • 4,517
  • 15
  • 44
  • 54
104
votes
2 answers

Why do I receive a DMARC report everyday?

I've setup DMARC policy on my domain. But every day I recieve an XML report from Google. I don't understand what the problem is? The report is:
IvanS
  • 1,204
  • 2
  • 8
  • 8
103
votes
12 answers

xml.LoadData - Data at the root level is invalid. Line 1, position 1

I'm trying to parse some XML inside a WiX installer. The XML would be an object of all my errors returned from a web server. I'm getting the error in the question title with this code: XmlDocument xml = new XmlDocument(); try { …
Chris
  • 2,619
  • 6
  • 27
  • 34
1
2 3
99 100