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

How to define collision filter groups across model instances?

When constructing a MultiBodyPlant from multiple ModelInstances each loaded from a separate URDF, is there a way to define collision filter groups to exclude collisions across model instances? In the multibody URDF parser, loading collision filter…
syler
  • 23
  • 3
2
votes
3 answers

JAVA code snippet to replace single quote(') to double quote in whole XML file

I have a XML file having nested tags. We can use DOM, JDOM parser I want to replace inside the string of all tag from single quote(') to double quote in whole XML file. tag can be nested inside tags also. I want some for loop which looks for all …
2
votes
1 answer

XMLInputFactory setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,"") gives Unrecognized property

Environment: Java 8 / SpringBoot v1.3.3.RELEASE This is an old Java code base. Recently sonar was introduced and my task is to fix Critical/Blocker level security vulnerabilities. At this code sonar recommends to "Disable access to external entities…
samme4life
  • 1,143
  • 2
  • 14
  • 20
2
votes
2 answers

XSLT: How to replace the first sibling with a concatenation of all siblings?

I'm having a hard time trying to implement an XSL transformation. I need to transform this: 1 Homepage AB308E
Lucie
  • 23
  • 3
2
votes
1 answer

TestNG - "Unable to parse suite" error when trying to run an XML file

I am developing a test automation project using: IntelliJ, Maven, TestNG and Selenium Webdriver. The problem is that I am unable to run XML suite files. Right-clicking on such file gives me the option to run them but it fails with error: Unable to…
Gafi
  • 61
  • 1
  • 10
2
votes
2 answers

Recursive to Iterative conversion of code written in C

This is code to print an xml tree in C. How to write this iteratively? static void print_element_names(xmlNode *a_node) { xmlNode *cur_node = NULL; for (cur_node = a_node; cur_node; cur_node = cur_node->next) { if (cur_node->type ==…
Rocket
  • 123
  • 8
2
votes
1 answer

Parser error on Xpand: SAXParserFactoryImpl cannot be cast to SAXParserFactory

I am getting this dialog box when i am building my application with Xpand. "An internal error occurred during: "Analyzing accessible EMF metamodels for project my.generator.project". org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to…
Eshika
  • 321
  • 1
  • 8
  • 20
2
votes
2 answers

Converting CSV file to XML with Perl

I'm trying to parse a CSV file and convert it to XML. The .csv file consists of a list of entries, separated by commas. So, two sample entries look like this: License,Date,Mileage 04-nh-pd,17-11-2020,30000 19-tg-jr,17-11-2020,36000 Expected…
Toine de L
  • 43
  • 3
2
votes
2 answers

Reading CDATA with lxml, problem with end of line

Hello I am parsing a xml document with contains bunch of CDATA sections. I was working with no problems till now. I realised that when I am reading the an element and getting the text abribute I am getting end of line characters at the beggining and…
Jmm86
  • 103
  • 8
2
votes
1 answer

Exclude certain class of table data from XMLIMPORT

I'm trying to retrieve the data from the table on this website, in Sheets: https://www.basketball-reference.com/leagues/NBA_2021_totals.html When I use this simple formula: =IMPORTXML(A1,"//tr"), I am able to get the whole table BUT it is including…
2
votes
2 answers

Stack Overflow Error Using SAX Parser in Java

so a friend and I are working on this project and we'd been trying to figure out how to pull out the values from individual text nodes within an XML file. He was able to come up with a bit of code that extracts the text nodes we are looking for, but…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
2
votes
1 answer

Extracting Text Nodes From XML File Using SAX Parser in JAVA

So I am currently using SAX to try and extract some information from a a number of xml documents I am working from. Thus far, it is really easy to extract the attribute values. However, I have no clue how to go about extracting actual values from a…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
2
votes
3 answers

Python extract data from xml

I'm trying to get the values from this web page: This XML file does not appear to have any style information associated with it. The document tree is shown below.
2
votes
1 answer

Filter out certain XML nodes and form another XML with these nodes and their ancestors and child nodes

I have below XML data and I need to filter certain XML nodes and form another XML data with those nodes and it's ancestor nodes as well as all of it's child nodes. I am new to XSLT and tried different approach using XSLT but nothing is working. Can…
Nijith
  • 69
  • 6
2
votes
2 answers

Problem With SAX Parsing in Java

So I asked a question earlier just to brush up on some basics of SAX and I learned a lot from the answers. From what I learned, I tried to create a Java program that would traverse a bunch of directories (necessary part of the larger project I'm…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
1 2 3
99
100