Questions tagged [xml]

XML, which stands for Extensible Markup Language, is a meticulously crafted document format that lays down rules for encoding text. To enhance the power of this tag, try incorporating supplementary tags like programming languages, tool sets, and various XML technologies being employed along with other tags that accurately describe the problem's surroundings. The versatility of XML allows for an extensive range of human as well as machine data transfers, so make sure to provide focused details on the tools and libraries being utilized.

Tips for eliminating XML tags with regular expressions in Python

Python strings can contain plain text and XML tags with information. For example: The student XYZ abc has been terminated from the institute. you can find the details of student below: <info StatusCode="End"> <user_detail> <name ...

What methods are available for retrieving specific XML entries using JavaScript?

Hey there, I'm dealing with this XML code <book> <bookname>book1</bookname> <author>authorman</author> </book> <book> <bookname>book2</bookname> <author>authorperson</author> </book ...

Prevent header from being displayed in XML response in Symfony 2

I am currently working on generating an xml document using Symfony. The generation process is successful and I am returning the document using a Twig template named sitemap.xml.twig as shown below: <?xml version="1.0" encoding="UTF-8"?> <urlset x ...

Is Jackson a suitable tool for conducting XSLT transformations?

Within our projects, we utilize Jackson for mapping between JSON and Java objects, as well as Jettison for converting XML input streams to JSON objects. One common scenario involves applying an XSLT transformation on an XML document to create a "JSONized" ...

Node.js Express request only returns the header when receiving XML data

Utilizing http://expressjs.com/ and https://github.com/request/request to create an API call and retrieve an XML response for the browser. However, instead of the body, it is returning the Header. var express = require('express'); var request = ...

transform JSON data into XML format with the help of JavaScript

I need help converting a JSON object to an XML String and I'm struggling to find the right method. I recently came across a jQuery plugin called json2xml on https://gist.github.com/c4milo/3738875 but unfortunately, it does not properly escape the data ...

Converting XML to JSON using JSON.Net

Here is the XML snippet I am working with: <?xml version="1.0" encoding="utf-8" ?> <XslMapper> <type name="article" xsl="http://localhost:8080/Xsl-a.xslt"> <category name="1234" xsl="http://localhost:8080/Xsl-b.xslt"></cat ...

What is the process for identifying the relative x path of a distinctive code?

There are 3 matching nodes with the same source code which is causing the failure: //img[(@src='/PHYLINSPortlet/images/override-0.gif')] <img id="_PHYLINSPortlet_WAR_PHYLINSPortlet_INSTANCE_o3P5_:form_PolicyContent_UI2:Messages:0:j_id1885:0:j ...

Having trouble with Simplehtmldom's innertext function?

While working with simple_html_dom: I encountered the following code snippet: $j = ' <itemBody> <div>films - to watch (Simple Present)<br/> <textEntryInteraction responseIdentifier="RESPONSE_1"/> ...

Update the object with fresh data once the XML data is transformed into JSON format

I am currently converting XML attributes into JSON format. Below is the complete function that I will explain step by step: request.execute('[someSP].[spSomeSP]', function(err, dataset) { if (err) { reject(err); } if (reque ...

Retrieve user information after logging into TWITTER

Hello, I am looking for a way to retrieve user details such as ID, Name, and Screen Name after the user has logged in to my application. Once the user enters their login details, I need to be able to fetch these details in real-time and store them in a da ...

JavaScript encountered an issue while parsing XML: the format is not well-formed

I keep seeing an error message saying "Error parsing XML: not well-formed" when I encounter this line in my javascript code: for (var i=1; i<=totalImgs; i++) If I remove the < character from the line, the parsing error goes away. However, the javas ...

Guide on transferring a particular XML element to a separate XML document using Python

I have several xml files similar to the example below:- File Name = Updated input.xml <?xml version="1.0"?> <TestSuite Name="A123"> <Group Name="TestRoot" ExecutionPolicy="AnyDeviceAnyOrder"> < ...

Challenge encountered while creating a child tag that can be assigned to multiple parent tags

I have an xml format like the one provided. <xml> <parent id="0"> <child type="name"> </child> <child type="age"> </child> </parent> <parent id="1"> <ch ...

Combining API JSON data with XML in PHP

I have a complex inquiry at hand and I need some guidance to achieve the desired outcome. Currently, I am utilizing an API for a hotel booking system. Although the API works fine, it lacks certain details provided by the client in a separate static XML fi ...

Issue: When using the MYSQL PHP Foreach statement, only the first insert into statement is

I'm having an issue loading an XML file into my MySQL database using a foreach statement. The loop seems to be working correctly, but only the first iteration of the loop is actually being inserted into the database. <?xml version="1.0" encoding=" ...

Unfamiliar XML nodes being parsed by NodeJS xml-stream

I am in search of a robust tool to handle the parsing of large XML files, and recently stumbled upon xml-stream. While it is quite powerful, I am encountering an issue where it requires me to specify the expected field for unknown nodes. Here is an exampl ...

How can we most effectively test XML responses?

When it comes to testing webpages with xml responses, using Selenium IDE can be a challenge. While some opt for Selenium Remote Control or Pearl modules like WWW::Mechanize and Test::XML/Test::XPath, these may not be feasible options for those who prefer J ...

Tips for parsing information contained in a cdata tag using python

I have successfully used Beautiful Soup to extract CDATA from an HTML page, but now I need to parse the contents and save them in a CSV file. Here is the code I am using: from bs4 import BeautifulSoup from urllib.request import urlopen import re import c ...

Having trouble correctly parsing XML data using JavaScript

My input field contains the following XML code: <?xml version="1.0" encoding="utf-8"?> <players timestamp="1536505850"> <player id="0518" name="Eagles, Philadelphia" position="Def" team="PHI" /> <player id="10271" name="Jones, Jul ...

XML data is not returned by the __getLastResponse function

Encountering an issue where I am unable to retrieve the XML response. The response seems correct when stored in the PHP variable $lists, but attempting to extract the XML version of the response using _getLastResponse does not display any XML. Below is th ...

The button is not responsive to user interactions

For a Magento-based website, I have been developing an automated checkout script using Python 3.8. Everything was working smoothly until we reached the shipping selection stage. The error message "element not interactable" appears when trying to click the ...

Trouble arises when implementing AJAX in conjunction with PHP!

I am facing an issue with my PHP page which collects mp3 links from downloads.nl. The results are converted to XML and display correctly. However, the problem arises when trying to access this XML data using ajax. Both the files are on the same domain, b ...

The XML information vanished during the transformation into JSON format

After converting XML to JSON using multiple conversion libraries, I noticed that the property name attributes and Item name attributes were lost. Why is this happening? Does anyone have suggestions on how I can modify my XML to make it more compatible for ...

Converting XML to HTML with the help of XSLT transformation customization

I need assistance in adjusting the XSLT 1.0 transform within the provided xsl file to create an HTML version of the table coded in the attached XML file. The generated HTML output file should display the table from the XML file with alternating row backgro ...

Converting JSON to XML while preserving the original order of elements

Utilizing the following code snippet to translate JSON into XML across multiple XML files with varying JSON structures. String toXmlRequest = fullRequest.toString(); JSONObject jsonObj = new JSONObject(toXmlRequest); String X ...

When using XML, what situations can cause jquery's .attr() and getAttribute() to provide varying results?

When I receive an XML response from a server and parse it in jquery (jQuery 1.8.2 on Chrome 23.0.1271.64 and Firefox 15.01) to retrieve various attributes, it works correctly most of the time. However, occasionally the attr() call returns the entire elemen ...

Using Javascript to attach <head> elements can be accomplished with the .innerHTML property, however, it does not work with XML child nodes

Exploring new ways to achieve my goal here! I want to include one JS and one jQuery attachment for each head section on every page of my static website. My files are: home.html <head> <script src="https://ajax.googleapis.com/ajax/libs/jquer ...

Switching XML to JSON using Python while confirming it against a schema

I am looking for a solution to convert XMLs into JSON format. Although I have found various packages like xmltodict in Python that can accomplish this, I'm facing an issue where single elements within a node are being converted into dictionaries. Howe ...

`The steps to retrieve XML response data from an API request`

When using axios to make an API request, how can I receive data in XML format? For example: axios.get(/* URL */).then(response => {/* How do I retrieve the XML data? */}).catch(err => {/* result */}); ...

The efficiency of XSL Template is significantly impacting loading time

Hello there, I am facing a challenge with my webpage's loading speed due to the code provided below. Can you assist me in optimizing it? <xsl:template match="Category" mode="CategorySelectorScript"> <xsl:variable name="ThisCategoryID ...

Struggling with XML parsing using JQuery

Currently, I am tackling a project that involves creating an endless scroller designed to fetch information from a MySQL database that has been established. As far as my scroller component goes, everything appears to be functioning correctly. Additionally, ...

How to exclude elements nested inside another element using CSS or XPath techniques

Presented here is a snippet of XML code: <xml> <section> <element>good</element> <section class="ignored"> <element>bad</element> </section> </section> </xml> Identifying a ...

Icon positioned to the left within the text box

Hey there! I'm new to NativeScript and I've been struggling to place an icon inside a textbox. Can someone please help me out? Expected Output: https://i.stack.imgur.com/xvoZG.png Code <GridLayout columns="*, *" rows=& ...

Exploring the world of web scraping using R's XML package with the powerful xpathS

I need help extracting the names of shopping malls from a specific website. The URL is provided here: After examining the html code, I noticed that the mall names are stored under the "h5" tag. I tried to extract the text using the following codes, but it ...

Navigating XML documents in PHP using OTA standards

While I have a basic understanding of utilizing Xpath in PHP, I am currently facing difficulties with a specific scenario. Initially, I suspect that the issue lies within the standards. The following XML snippet adheres to the OTA standards: <SendHote ...

XMLHttpRequest Error: The elusive 404 code appears despite the existence of the file

This is the organization of my project files: The folders Voice, Text, and Template are included. https://i.stack.imgur.com/9un9X.png When I execute python app.py and navigate to localhost http://0.0.0.0:8080/, the index.html page is displayed with conte ...

Utilizing PHP for XML exportation and fetching it through AJAX to integrate it into the DOM, unfortunately, the XML content remains invisible

I've encountered a strange issue with a PHP script that generates valid XML output. I'm trying to fetch this data using an Ajax XMLHttpRequest call in the browser. Although Firebug confirms that the Ajax request is successful and the XML is valid, I'm fac ...

Delivering XML in response to a webmethod call

While working with an ajax PageMethod to call an asp.net webmethod, I encountered an issue when trying to pass a significant amount of XML back to a callback javascript function. Currently, I am converting the XML into a string and passing it in that form ...

Presenting XML data in HTML using a customized CSS stylesheet

I've explored various methods for showcasing an XML file on a web page using HTML, but I haven't yet encountered one that incorporates a CSS style sheet. The XML file I have already includes a CSS style sheet. When viewed in a web browser, the .xml file d ...

The ajax method for loading an xml file results in displaying the undefined message

When attempting to fetch content from an xml file using ajax, the page initially displays "undefined". However, upon refreshing the page, the content loads successfully. Take a look at my code snippet below: $.ajax({ type: "GET", url: "xm ...

Working with C++ to extract and store information from a map containing boost::any values in XML or JSON form

The map is declared as follows: std::map<const std::string,boost::any> data I am looking to create a function that can transfer all the data from the map to a file and another function that can read this data back in, initializing the map with the c ...

Performing recursive XML parsing with the power of JQuery

<script> $(document).ready(function(){ const xmlData = "<root> <method name='A'> <childcall name='B'></childcall> <childcall ...

Displaying XML data in an HTML table

Encountered a challenge while fetching data from an external XML document using JS. Following the w3schools tutorial for AJAX XML, but faced an issue I couldn't resolve. The XML structure is as follows: <root> <document-id> <author ...

What is the best location to insert CSS in an HTML document?

I tried to customize the CSS on my Blogger blog, but unfortunately, I am unable to access the theme designer. As a result, I attempted to add CSS directly into the code using tags. However, I am having trouble locating the tag within the HTML file. This is ...

Is there a way to transform the XML output from Roku TV's API into JSON format?

I've been working on developing an application that interacts with the Roku TV ECP API commands. One specific call I'm attempting to make retrieves a list of all installed channels and returns it in XML format. However, every time I make this API call, I e ...

Is there a way to transfer information from an ajax function to an express js server?

Is there a way to transfer data from a separate JS file to my Express.js server? I'm attempting to parse XML files using AJAX/jQuery and send the resulting data to an Express.js server. The parser is located in a different file within the /public/jav ...

extracting information from XML datasets

XML Sample: <liste> <okul>kod="1" durumid="6" genelid="11702" adi="istanbul lisesi"/> <puan>genelpuan"2" sosyalpuan="0" matpuan="3"/> <okul>kod="6" durumid="8" genelid="11345" adi="ankara lisesi"/> <puan>genelpuan"4" ...

Enhance PHP code to efficiently insert a large set of 86,000 entries into a MySQL database using XML

Every day, I have to upload a large amount of data from an XML file into my MySQL database using a cron job. However, the process takes around 2 hours to complete. Is there a way to reduce this time? Below is the code I am currently using: I am utilizing ...

The browser does not support the display of Spanish special characters

I am working on a website and need to incorporate support for the Spanish language. I have prepared an XML file with both English and Spanish text. The XML file is being read based on the user's selection of language from a dropdown menu. Everything s ...

Encountered a problem while parsing an XML file using JavaScript from an external server

Currently, I am developing an iPhone application in HTML that needs to pull content from an XML file stored on a remote server and display it in a list. I have successfully accomplished this task when the XML file is hosted on the same server using the fo ...

What are the drawbacks of automating the process of generating charts to track time spent on webpages?

!RESOLVED! I am looking to automatically generate charts based on users and their time spent on different pages of a website. I have a file named "log.xml" where I store user information (customers), visited pages, dates, and the time they spent; once I ...

Creating a customized display on a webpage using XML and XSL to generate unique

Looking to utilize my xml file for generating various xsl pages. <movies> <movie> <name>Shark tank</name> <movie> <movie> <name>Tank Shark</name> <movie> ...

Iterating through XML elements using a loop in jQuery

I am trying to figure out how to loop through XML data obtained from an ajax request using a for each loop. The code snippet below currently only grabs the id attribute of the first success element and logs it. Is there a way to modify this code so that i ...

Converting UML diagrams into JSON Schema and XSD files

A simple UML diagram has been created as part of a larger cinema diagram. Link to Image Based on the diagram, Json Schema and XSD files were generated: Json Schema: -> movieSchema.json { "type": "object", "required": true, "properties" ...

"An error has occurred during the ANT build, resulting in java.lang.NoClass

I encountered an issue related to the classpath during the run phase. The error message reads as follows: run: [java] java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver [java] at java.lang.Class.getDeclaredMethods0(Native Method) [ ...

Converting XML data into a properly formatted JSON string

Looking to feed XML into an api endpoint, but first need to convert it to a JSON valid string. Many online parsers convert XML to a JSON object with the same structure as the XML, but that's not what I want. I need the XML converted into a string for use a ...

Utilize PHP for loop to output form values into XML format

Hey there, I'm currently facing an issue with setting up a for loop in PHP to transfer the content of an HTML form into an XML file. It works perfectly fine without the for loop, but throws errors when included. Can anyone provide some insights? It&ap ...

Issue with converting valid JSON to XML using XSLT 3.0 json-to-xml() function

The following JSON appears to be valid, but when attempting to transform it using XSLT 3.0's json-to-xml() function, an error related to the JSON syntax is encountered. { "identifier": { "use": "<div xmlns="http://www.w3.org/19 ...

Having trouble receiving the desired JSON format with xml2js, is there a way to resolve this issue?

After attempting to convert an XML file obtained from an external server into JSON using xml2json, it appears that the conversion is not producing a valid JSON output. It seems like there may be an issue with missing quotes for the keys. Are there adjustme ...

Ways to make a jsonp request without including the 'callback' in the URL

I've been working on retrieving information from an Icecast Radio station using their API, which offers the status-json.xsl endpoint to access this data. Despite the format being in xsl, I suspect it returns a JSON file. However, I've encountered an issue ...

Converting XML into an Array Using PHP

I attempted to parse an XML string using PHP. Here is an example of the XML: <?xml version="1.0"?> <root> <Log> <Item> <name>![CDATA[James]]</name> <address>![CDATA[Korea]]< ...

Challenges with XML parsing in Ajax and jQuery

Encountering an Issue: Add "undefined" for each element. I've spent hours researching solutions to this problem, but have not been able to find a resolution. Apologies if this question has been asked numerous times before. I am attempting to retriev ...

Include a new XML child element using PHP

I've encountered an issue with my PHP code while trying to add multiple nodes from an XML file. Currently, the code only adds the first node, but I need it to include all child nodes under the name 'node'. XML Structure: <root> <result> <no ...

Creating an XML file and prompting a download using PHP

I'm having trouble getting the code below to prompt a download of an XML file. I keep receiving a warning that says: "Warning: Cannot modify header information - headers already sent by". How can I properly set the header before the $data in order to res ...

I need to know how to send a "put" request using JavaScript and Ajax

My task involves programmatically updating a spreadsheet using my code. I am able to write to a specific cell within the spreadsheet with the following function: function update(){ jQuery.ajax({ type: 'PUT', ...

Ways to extract email content from various XML documents

In my MEAN stack application, I have successfully implemented nodemailer for sending emails. Now, I am working on a feature where the email content is dynamic based on different situations. To achieve this, I am storing the mail content in an XML file and ...

What is the best way to retrieve a specific section of text from a variable that holds XML information in PHP?

As a newcomer to PHP programming, I need assistance. I have a variable called $output that holds an XML response obtained from a server. How can I extract the "value" data and assign it to a different variable? For instance, let's say we want to assign $ ...

Having Trouble Operating Virtual Tour in Flash

I recently used a third-party software to create a virtual tour for my client's website. The virtual tour works perfectly fine on its own, as you can see here: However, when I tried to include the virtual_tour.html page on the index page of the website, i ...

Transform the initial HTML table row into a header row for every table by utilizing XSLT

My XML file contains HTML content that I need to manipulate. Previously, I used <xsl:copy-of select="customFields/customField[@name='mainContent']/html"/> to bring the content to the correct location. Now, I have a new requirement to convert the firs ...

Having trouble retrieving the "Information" within the XML information model: <Personal Information> Information </Personal>

I'm trying to retrieve the "Data" from this XML data structure: <Name Attributes> Data </Name> Using Python's normal parsing with .attrib, I can only access the "Attributes" but I really need the "Data." Can you help explain what this data s ...

XML Feed Date/Time Validator Not Producing a Correct Outcome

I need help troubleshooting a critical alert script. The issue lies in checking if the XML item is less than '40000000000' seconds old and displaying 'Its been less than 24 hours'. Even though I set it to an extremely high number, it ke ...

Troubleshooting Issue: XMLHttpRequest Incompatibility with Internet Explorer

I'm having an issue with the script below. It works fine on Firefox and Chrome but doesn't seem to work on IE. I've tried various solutions, including lowering the security settings on my browser, but it still won't work. function se ...

Does Objective C have a counterpart to the encode() method in JavaScript?

NSString *searchString = @"Lyngbø"; NSLog("%@",[searchString stringByAddingPercentEscapeUsingEncoding:NSUTF8StringEncoding]); The result is: Lyng%C3%B8 <script type="text/javascript"> document.write(escape("Lyngbø")); </script> The result ...

Extract website information, transform into JSON format, input into SQL database?

I have this interesting project where I am seeking to extract data from an external webpage, transform it into a specific structure, and then store it in a database. The purpose of doing this is purely for enjoyment - I'm essentially replicating an event ...