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

Why can't I catch this XML exception?

Context I've written a class to handle settings for my ASP.NET MVC app. However after testing how it handles a malformed/ missing XML file the exception it seems to throw is uncatchable and it repeats endlessly without catching or moving on with…
2
votes
2 answers

Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications

I am trying to use validate my xml with UBL 2.1 standards in line with Saudi Arabia ZATCA(Zakat, Tax and Customs Authority) specifications.The url of this validatoe : https://sandbox.zatca.gov.sa/TestXML .But I can't validate that as my xml looking…
2
votes
3 answers

Converting text to python list

I have this text- text = """Lesson 01: Design AuthorizationLearning ObjectivesChoosing an Authorization ApproachAccess Management…
2
votes
1 answer

Auto buy price in buff163

I want to get this number (dollar price) . def get_auto_buy_price(self): id = 35650 # specital number for items url = f"https://buff.163.com/goods/{id}?from=market#tab=buying" html = requests.get(url) soup =…
2
votes
1 answer

XML Null when getting child node

Null results when trying to access children of the first item. I'm using Google App Scripts. function parseXml() { var url = 'https://example.xml'; var xml = UrlFetchApp.fetch(url).getContentText(); var document = XmlService.parse(xml); var…
fasito
  • 90
  • 6
2
votes
1 answer

Java XML Parsing: Avoid entity reference resolution

I am currently parsing XHTML documents with a DOM parser, like: final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(false); final DocumentBuilder db =…
Daniel Fernández
  • 7,335
  • 2
  • 30
  • 33
2
votes
1 answer

Parse XML file and populate object with values

After I send a request with the required parameters in the response I get the following XML:
image url Click Here image title image…
Johancho
  • 105
  • 2
  • 6
2
votes
0 answers

python - convert docx to HTML including Fonts and Fonts Size

I'm trying to convert a file from Docx to HTML with font family, fonts size and colors in Python, I tried couple of solutions i.e Python docx, docx2html, Python Mammoth. but none of the packages works for me. these packages are converting to HTML,…
2
votes
2 answers

XML::Parser breaks text strings randomly

This question is analogous to HTML::PullParser splits up text element randomly. Basically I'm running XML::Parser and when it gets strings back, it breaks them into multiple pieces (to speed things up, I suppose). But what can I do to prevent this…
Zhang18
  • 4,800
  • 10
  • 50
  • 67
2
votes
1 answer

Get a string from Rescources in Adapter

Trying to get a string value from R.string to display here in my adapter but only getting an integer in return: class AlarmListAdapter() : RecyclerView.Adapter() { class MyViewHolder(binding: LayoutAlarmBinding) :…
2
votes
1 answer

How can you use IMPORTXML to get a YouTube Thumbnail from the XML feed?

I'm trying to populate a Google Sheet with a table that contains the 10 most recent YouTube videos from a channel along with the video title, video URL, date, description, and thumbnail image. When I try to use IMPORTXML on the Google Sheet, I get…
2
votes
3 answers

XBRL: How do you merge rows from different filings?

We use a XBRL processor to ingest filings from SEC. Often times, a company declares a metric in different filings with different concepts - with or without exactly matching values - but to be regarded as the same financial metric. Essentially when…
DebD
  • 373
  • 3
  • 20
2
votes
1 answer

How to extract XML processing instructions in Emacs Lisp?

I would like to extract the processing instructions (particularly xml-model) from an XML file; yet both (n)xml-parse-file as well as libxml-parse-xml-region do not recognize processing instructions. Is there a clean way to extract processing…
upgrd
  • 720
  • 7
  • 16
2
votes
2 answers

Encoding in UTF-8

I need to get an XML file from some CRM software. The XML file encoding is in UTF-8, but some "strange" characters are present, and I can't parse the file with simple_xml due to these characters. For example: the…
bahamut100
  • 1,795
  • 7
  • 27
  • 38
2
votes
2 answers

Replace an HTML element with some HTML contained in a string

Let's say I have this portion of HTML document:
hello world
In straight JavaScript, I need to replace the span with some HTML content contained in a string like 'other yo