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.

Filter by
Sorted by
Tagged with
0 votes
2 answers
27 views

Dynamic XML Element Using JAXB

So lets get an example going lets say you have this XML. <?xml version="1.0" encoding="UTF-8"?> <test> <KeyEvents> <num_events>4</num_events&...
Jardo's user avatar
  • 31
0 votes
0 answers
12 views

Include member type checking in python classes generated using generateDS module

Hi I am trying to generate schema class from XSD file in python using "generateDS" module. The classes that are generated does not have type checking. I want to generate classes that have ...
Anuj Tripathi's user avatar
0 votes
1 answer
38 views

need help parsing XML that contains namespace into ABAP internal table

I am trying to convert this XML file into ABAP internal table where the root tag <CBISDDStsRptLogMsg.... \> contains namespace and my Simple Transformation is dumping an exception without much ...
smokey's user avatar
  • 3
0 votes
2 answers
31 views

component-based XML library

Is there an XML library where we divide the code into various components? and on final we build/merge it main.xml content is: <?xml version="1.0" encoding="UTF-8"?> <...
kyzsuki's user avatar
1 vote
1 answer
31 views

How do I change the text of multiple elements with the same name in elementtree

So I have an XML which has a line: <factor-apply>1.2</factor-apply> And this line is in my XML twice. I would like to change the text for both lines such that they both change to: <...
Mark's user avatar
  • 33
0 votes
0 answers
18 views

kafkaProducer parameter not in JSON format

I am getting below error after upgread the java verison from 1.8 to 11 java.lang.IllegalArgumentException: kafkaProducer parameter not in JSON format:$propertySource.spring.cloud.stream.kafka.bindings....
Lakshmibabu's user avatar
0 votes
1 answer
21 views

How to extract an attribute using xml-fast-parser

I can extract elements from parsed XML like so: import { XMLParser } from "fast-xml-parser"; let xml = '<gpx myAttr="fred"><trk>track 1</trk><trk>track 2&...
quilkin's user avatar
  • 1,077
0 votes
0 answers
31 views

getting issue unable to load cache item while upgrading java 8 to java17 with spring boot 3.2.1

I am upgrading from java 8 to spring boot 3.1.2, java 17. I am able to build the application, but run time getting this error. what are the clues. Exception in thread "main" java.lang....
rao's user avatar
  • 1
1 vote
1 answer
37 views

How to make a new rss feed by selecting entries from a rss feed by a criterion?

I want to select the entries from a rss feed when the sub-tag of an item has a <dc:type>Research Article</dc:type> tag. Then select the items based on this criterion and make a new feed ...
Galilean's user avatar
  • 258
-1 votes
1 answer
41 views

How do I change a particular part of a XML which has been read into Python and then create a new XML with this change? [duplicate]

So I am using BeautifulSoup to read and parse an XML below: from bs4 import BeautifulSoup with open(r"....TestXML.xml", 'r') as f: data = f.read() bs_data = BeautifulSoup(data, "...
Mark's user avatar
  • 33
0 votes
1 answer
59 views

How do I apply for-each-group and return 1 row per Code listed if within the a specified date range?

I am trying to create a couple nested loops in my code to group by Time_Data/Time_Off/Code. I want to display all Time Off Codes that fall within consecutive days on 1 line in the output. Any ...
schwiz23's user avatar
1 vote
4 answers
75 views

how do i find out if an attribute in xpath contains any value from a specific list

how do i find out if an attribute in xpath contains any value from a specific list, for example in the below case, i want to find X/Y , which has an attribute A has any value , from the list {"...
Divya MV's user avatar
  • 2,039
0 votes
1 answer
30 views

How to find element with specifc attribute value and element value

Please help with a xpath expression as explained below <A> <B x="P" Z="flag">2</B> <B x="Q" Z="nonflag"></B> <...
Divya MV's user avatar
  • 2,039
0 votes
0 answers
47 views

Parsing Nested XML with common column names using pandas read_xml

I have a nested xml file with common column name (In this case - Name). I need to parse this XML to have different columns. <Employee> <Name>Tanmay</Name> <City> ...
Shekar Tippur's user avatar
0 votes
1 answer
40 views

Trouble Extracting Elements from Google Support Pages Using IMPORTXML in Google Sheets

I am attempting to use the IMPORTXML function in Google Sheets to extract elements from a specific Google Support page. The formula works fine with other URLs, but when I use it on a Google Support ...
ali izadi's user avatar
  • 145
0 votes
0 answers
64 views

Python - keep output XML namespace definitions at non-root nodes with ElementTree [duplicate]

I want to generate an output XML from a modified input XML in Python using xml.etree.ElementTree (short: ElementTree). The input XML has multiple namespaces and the output XML should also have these ...
bproxauf's user avatar
  • 1,084
0 votes
0 answers
29 views

parse word documents in python with zipfile and ElementTree but fail to extract paragraphs until next header

I am using zipfile and ElementTree to extract headers (in Heading2 styles) and their corresponding paragraphs. Here are my code: import zipfile import xml.etree.ElementTree as ET doc = zipfile....
Lok's user avatar
  • 35
0 votes
1 answer
51 views

Foreach string parameter PHP

I parse XML like this <offer internal-id="3"> <floor>2</floor> <name>Building 1</name> <image>picture.jpg</image> <image tag="plan">...
Sergei's user avatar
  • 13
0 votes
1 answer
37 views

PHP-Laravel Amazon feed XML Parsing Fatal Error at Line 1, Column 1

<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> <Header> <DocumentVersion>1.02</...
Mica's user avatar
  • 3
0 votes
0 answers
44 views

How to handle "invalid character" errors with PHP xml_parse?

When parsing a file received from a trusted third party, I've an error Invalid character (error code: 9) caused by the invalid HTML entity &#2; (see weird things below). How could I handle that ...
Pascal Polleunus's user avatar
0 votes
1 answer
68 views

Laravel: XML Parsing Fatal Error at Line 1, Column 1: Content is not allowed in prolog. Content is not allowed in prolog

I am trying to post product in Amazon Seller account with Laravel. But I am getting error: XML Parsing Fatal Error at Line 1, Column 1: Content is not allowed in prolog. Content is not allowed in ...
Mica's user avatar
  • 3
0 votes
1 answer
46 views

Xpath inside xpath

I am trying to create an xpath for the below scenario, could you please help ? How can i find out the value of C whose @parent is /A/B/@id, that is PQR, C may not be the immediate next node . I want ...
Divya MV's user avatar
  • 2,039
-1 votes
1 answer
28 views

Notepad++ how to replace with random positions of text

I wanna replace few strings in my XML, but i didn't know, how to "TAG?" strings. I lost my passwords from Opera, but i got old copy from Mozilla but they was at different groups and parses ...
heni1's user avatar
  • 3
0 votes
0 answers
3k views

Convert xml to object when only the wrapper tag is fixed

I have a string like below <Ouput> <tag1>xxxxx</tag1> <tag2>xxxxx</tag2> <tag3>xxxxx</tag3> </Ouput> It is always surrounded by an OutPut ...
Ngoclong Pham's user avatar
0 votes
0 answers
49 views

Content in xml parse script show as array instead html

When I parse xml one object is shown as array because it has tags inside. How to use it as html content instead? Here is xml data: <product> <id>10001</id> <sku>SKU0001<...
dodo's user avatar
  • 9
1 vote
1 answer
47 views

VBA Reading XML into Treeview in Excel

I have a small form with a Treeview control in Excel. References include OLE Automation, Microsoft Forms 2.0, Microsoft Windows Common Controls 6.0 (SP6), and Microsoft XML, v6.0 I call the ...
Nick's user avatar
  • 481
0 votes
1 answer
38 views

XML Deserialization Error - CLR/System.InvalidOperationException

Im trying to deserialize an XML file into an object but I keep receiving the same error (noted below). I believe I have the objected mapped correctly. I have been using this guide and this video as ...
XmalevolentX's user avatar
-2 votes
1 answer
28 views

Parsing "XML Spreadsheet 2003" into a Pandas dataframe

I have 6000+ XML Spreadsheet files that I would like to parse into Pandas DataFrames. Preferably I would like to do this using the pd.read_xml method and provide the correct arguments (x-path?). I ...
JM Nel's user avatar
  • 49
0 votes
0 answers
13 views

I'm not able to get the Message ID from Xml by DOM parse

Below is the xml using to get message ID and after executing it is stopping at Sysout Statement Current Element :S7:searchServiceRequest not going forward Please suggest way forward on this and what ...
Rakshitha N's user avatar
0 votes
1 answer
54 views

Trouble with XML parsing in VBA: Extracting multiple Node values from NodeList

This XML document below is an invoice with order items. Various master data must be extracted for each order item. For the sake of simplicity, we will only consider the <ram:SellerAssignedID>. ...
smartini's user avatar
  • 415
0 votes
0 answers
23 views

Authentication before call jira.issueviews:issue-xml

I usually access some ticket information from my company's Jira using the issue view:issue-xml method, directly from my browser. https://mycompany.atlassian.net/si/jira.issueviews:issue-xml/TICKET-123/...
Nicolaesse's user avatar
  • 2,608
0 votes
0 answers
77 views

Python script runs on Google Colab but not locally

I was trying to run this script in a VS Code pyhton notebook and got that error. import requests import xmltodict xml = requests.get('https://websvc.biocyc.org/getxml?id=META:TYRFUMCAT-PWY') dbiocyc = ...
luizgsm's user avatar
0 votes
0 answers
30 views

Dynamic root element marshaling failed in XSD

I have below XML , <?xml version="1.0" encoding="UTF-8" ?> <META_1> <row num="1"><symbol>ABC</symbol></row> <row num="2"&...
Deepak_5755's user avatar
0 votes
0 answers
27 views

How to store/query an XML file in Oracle 12.2

Im trying to figure out the best was to parse an external XML file in Oracle. We have a number of XML files titled "XMLFileToImport_YYYYMMDD01234" with the following format. <Employee> ...
XmalevolentX's user avatar
0 votes
0 answers
43 views

Deserialize a XML list of fix values

Given the following XML: <Values> <Value ID="Foo">foo</Value> <Value ID="Bar">42</Value> </Values> The list of IDs is always the same. How ...
Jakube's user avatar
  • 3,383
0 votes
1 answer
80 views

Extracting XML nodes into a dataframe when child nodes vary

I am building a code in R to extract grant data from IRS990PF files in XML format. I have built the following code that works well to build a dataframe for a file with only US grantees. However, the ...
msl's user avatar
  • 3
0 votes
0 answers
46 views

validate xml in a way that a value in a node in edge should be present in the nodes > node otherwise that is not valid

I have a scenario where I need to validate xml in a way that a value in a node in edge should be present in the nodes > node otherwise that is not valid <graph> <nodes> <node&...
Learner's user avatar
  • 1,730
-1 votes
1 answer
148 views

Trouble Parsing MusicXML Files from File Paths in Python

I'm working on a Python project where I need to parse MusicXML files. So far, I've been manually copying the content from these files into a string variable, and the code works perfectly. However, I'd ...
Saar Kol's user avatar
0 votes
1 answer
31 views

unique constraint on id not working and it always return true

Hey all I am trying to use unique constraint and here is my xml <graph> <id>g0</id> <id>g0</id> <name>test</name> </graph> now I need to validate ...
Learner's user avatar
  • 1,730
0 votes
1 answer
49 views

How to use sequence and non sequence childs in xml schema

1. I have a well-formed xml as follows <graph> <id>g0</id> <name>test</name> <nodes> <node> <id>a</id> ...
Learner's user avatar
  • 1,730
0 votes
2 answers
31 views

XML document not validating against XSD schema

I have the below XML Schema: <xs:element name="_links"> <xs:complexType> <xs:sequence> <xs:element name="self"> ...
Michael's user avatar
  • 2,537
0 votes
0 answers
24 views

KML/XML parsing at R not working: whole XML data gets stored in single object and is not being parsed

I'm guilty of newbieness. Help. I'vs downloaded data from Google Maps (personalized maps) in KML format and was expecting to transform it into some clean looking table. Boy was I wrong! KML reading ...
Igor Calado's user avatar
0 votes
1 answer
50 views

XML to CSV using xslt create an extra line

I have this XML, and I want to have a csv format: I'm using python with lxml.etree library <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <RsuProtocol ...
Ana Filipa Ferreira's user avatar
0 votes
0 answers
42 views

Finding the node position on an XDocument

I'm working on a XIB to XAML (Xam.Forms and .NET MAUI) converter. I've generated a lit of the connections from the XIB but have hit a snag on constructing the XAML. My old approach was to take each ...
Nodoid's user avatar
  • 1,469
0 votes
0 answers
63 views

Incorrect table alignment causing duplicates when reading through docx

I am parsing a word file in Python. One of the tables shows up with duplicate columns in the df. I think it is because the top two rows are not in the same line as the bottom rows. Here is what the ...
frisbeee's user avatar
0 votes
1 answer
44 views

Groovy - remove non unique values in a XML payload

I am trying to extract just two nodes from the xml payload. But it results in some duplicate values.Is there a way to get unique combination of values or to remove the duplicates value later on. ...
N21RL's user avatar
  • 11
0 votes
0 answers
30 views

Check an XML file for data items listen in an Excel file and return a listing if there is a match - Code is not working does not find match

Aloha and Mahalo for assisting me with this issue. I'm learning to code Python and have my challenges. What I'm trying to achieve here is the following: I have an excel file (xlsx) that has a list of ...
Janek's user avatar
  • 1
0 votes
0 answers
24 views

Jackson XML sort array by entry's attribute

I have a model Attribute, which in XML is an entry (<Long>, <String>, etc.) inside an <Attributes/> tag: <Attributes> <Long position="1"/> <String ...
Damir Yablonskikh's user avatar
0 votes
0 answers
20 views

How to create the full path to an element when parsing a XML-file? [duplicate]

I have a link to an XML file. $xml = simplexml_load_file('http://example.com'); <shop> <name>Shop name</name> <company>Company name</company> <url>...
Rediska's user avatar
  • 13
-1 votes
1 answer
42 views

Duplicating an XML element and adding it to a specific position in XML file using python

I have a xml file in which content looks like this: xml_content_to_search = <Document ProviderID="TD" DecimalMarker="comma" Website="https://erc-viewer.sap.com/"> &...
Yash Pisat's user avatar

1
2 3 4 5
278