New answers tagged xml
0
votes
Handling repeating rows when exporting spreadsheet to XML using XSLT
I realize you're using XSLT; but if you wanted to read the content.xml of the spreadsheet directly, a quick and easy fix for this is to make your numeric values formulas.
So instead of the cell having ...
- 25
0
votes
How to make a Requests to xml soap api in PHP
To make a request to an XML SOAP API in PHP, you can use the built-in SoapClient class. Here's an example of how you can make a request to an XML SOAP API:
<?php
// The URL of the XML SOAP API ...
- 1
2
votes
> and < gets converted to > and < while adding a xml like string in element.setTextContent()
That the content is escaped is intended. When you set the text content of an element, any special character like < have to be escaped like <, otherwise the text content will be interpreted ...
- 16k
1
vote
SQL Server extract data from XML column without tag names
You can use something like:
SELECT
N.C.value('let $i := . return count(//xml_line[. << $i]) + 1', 'int') as LineNumber,
Item.Node.value('local-name(.)', 'varchar(max)') name,
Item....
- 2,872
1
vote
Accepted
XSLT - Merge same ID elements and get non blank values from same group
I think in your template instead of the xsl:choose you just want/need
<xsl:template match="payment">
<xsl:variable name="curr-group" select="key('paymentKey', ...
- 156k
0
votes
XSLT to covert XML file to csv with no duplicate records
Not sure what makes a record a duplicate but if it's that all of the values are the same, you could group the record elements by joining the field values too.
So instead of:
<xsl:apply-templates ...
- 50.4k
0
votes
C# XML Select single sub node in node by value
If you need to use XPath (and there must be a very strong reason for it), you can use it with XElement:
var xml = """
<employees xmlns:bar="http://www.bar.org">
<...
- 6,677
0
votes
XSLT to covert XML file to csv with no duplicate records
Using Powershell
using assembly System.Xml
using assembly System.Xml.Linq
$input_filename = "c:\temp\test.xml"
$output_filename = "c:\temp\test.csv"
$xDoc = [System.Xml.Linq....
- 31.9k
0
votes
C# XML Select single sub node in node by value
While dealing with XMl, it is better to use LINQ to XML API.
It is available in the .Net Framework since 2007.
c#
void Main()
{
const string filePath = @"e:\Temp\WizardZZ.xml";
...
- 16.2k
2
votes
Doesnt understand attribute ?android:attr/textAppearanceLarge
The Android TextAppearance attribute is a special attribute used to apply text-specific styling to your View components.
The TextAppearance attribute is created to help Android developers create a ...
0
votes
JAXB Marshal missing Attribute/Element
I experienced same problem with field missing when marshaled. The field was not null (originally).
When debugged I find that in jaxbContext.typeMap.myFieldParrentClass.value.properties....
- 194
-3
votes
How to Display SVGs in Julia?
The most efficient way to display SVGs in Julia is to use the GR.jl library. Here's how you can display an SVG file:
using GR
# Load the SVG file
img = load("path/to/file.svg")
# Create a ...
- 667
0
votes
C# XML Select single sub node in node by value
Let's say we have a file called Employees.xml in our project directory.
We can load the xml file in our memory by using this assignment:
XmlDocument doc = new XmlDocument();
doc.Load("Employees....
- 1,565
0
votes
Android Material Text Input Layout End Icon Not Visible but working
After trying the solutions from this thread and finding they don't work in my case (the "clear text icon" from com.google.android.material.textfield.TextInputLayout wasn't always being ...
- 96
0
votes
Accepted
XSD Schema for the JSON Body
JSON and XML have different data models, which means that lossless round-tripping is generally impossible. If you want to achieve it, you will need to write custom code that understands your specific ...
- 153k
0
votes
Create the cXML punch-out API in the Determine P2P application django project
You can find the cXML user guide in the link below, if you want to set up your own service.
https://xml.cxml.org/current/cXMLUsersGuide.pdf
Alternatively you can employ an existing punchout service ...
- 657
0
votes
Remove empty namespace in java using DOM
Finally I found several solutions of the described problem.
First, you can remove all namespaces from all xml using this answer.
Second, if you do not need to remove all namespaces in Xml, but only ...
0
votes
Spring Jaxb2RootElementHttpMessageConverter not working with jaxb annotations
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(new MappingJackson2HttpMessageConverter());
converters.add(new ...
0
votes
How to parse XML and get instances of a particular node attribute?
I am wounder, that no one suggest pandas. Pandas have a function read_xml(), what is perfect for such flat xml structures.
import pandas as pd
xml = """<foo>
<bar>
...
- 293
1
vote
Accepted
How to manipulate xml based on the specific tags?
You are close, except TYPE isn't an attribute, it is a tag/element, so [TYPE='FIRST'] will not work.
Instead what you can do is iterate through all of the OUTER tags/elements, and test to see if they ...
- 12.9k
0
votes
Eclipse Java EE IDE for web developers - Breakpoints
Eclipse doesn't support debugging Ant scripts. You should, though, be able to debug the Java classes that make up the Ant tasks your script invokes (if you have the class files with line information, ...
- 18.7k
0
votes
Convert XML file to CSV with total record count and combining few columns
Given your use of XSLT 2.0, consider for-each-group where you map through all the @name values without suffix numbers for headers and again for records where you string join all the group values:
<?...
- 102k
0
votes
Whats the difference between [\s\S]*? and .*? in Java regular expressions?
it is like in javascript although i don't get use to java, but java is a type of program and it is very useful in our real life.
0
votes
Is there a way to match a template spanning multiple XML nodes in XSLT?
A 'functional' style XSLT 1.0 solution (with nodesets).
I must admit I don't think XSLT is well suited to this sort of thing, nodesets (like iterators in imperative languages) don't sit nicely (at ...
- 2,174
0
votes
Is there a way to match a template spanning multiple XML nodes in XSLT?
Here is a different approach that performs the transformation in two passes:
In the first pass, each LINE
element is assigned an id and a parent-id attribute;
In the second pass, these ids are used ...
- 110k
0
votes
Is there any alternative to Netflix Photon library for validating IMF packages?
There are a number of tools available from vendors who validate against the actual SMPTE specification. Photon is Netflix specific.
- 1
1
vote
Accepted
Can't read a property value from XML
Please try the following solution.
Notable points:
It is always better to use XML data type instead of the VARCHAR(..) for XML
data.
All XML elements are bound to the default namespace even if we don'...
- 16.2k
1
vote
Parse XML to CSV with python
Option 1: You can use pandas DataFrame read_xml() and to_csv():
import pandas as pd
df = pd.read_xml("prod_id.xml", xpath=".//record")
df.to_csv('prod.csv')
print(df.to_string())
...
- 293
0
votes
Parsing XML in Python with ElementTree
interface = ET.parse('interface2.xml')
interface_root = interface.getroot()
for interface_attribute in interface_root[0][0]:
print(f"{interface_attribute[0].text}, {interface_attribute[3][0]...
0
votes
I can't modify xml files from mujoco py
I believe you should provide more information regarding your question.
When you install the gym package it also downloads the necessary xml files and python scripts that involves gym environments ...
- 1
0
votes
Upload a xml file in spring integration using HttpRequestHandlingMessagingGateway
Here is a simple test to demonstrate how we can upload the file using Spring Integration:
@SpringJUnitWebConfig
@DirtiesContext
public class FileUploadTests {
@Autowired
private ...
- 109k
0
votes
How to retrieve snapshot data using SuccessFactors Compound Employee API?
WHat is the connector you are using ? Is it REST ? I see the response as XML . At this REST connector only support JSON .
https://learn.microsoft.com/en-us/azure/data-factory/connector-rest?tabs=data-...
- 1,489
0
votes
The Xpath command returns the datetime value instead of the correct value
For me the XPath you are using is unreadable and fragile, and this issue with the readibility is the cause you have selected maybe another anchor, I cannot tell without the whole HTML. This is the ...
- 2,702
0
votes
Is there a way to match a template spanning multiple XML nodes in XSLT?
This is possible, but not trivial, in XSLT 1.0.
One way to approach this is a technique known as "sibling recursion". In this case, it could be implemented as follows:
XSLT 1.0
<xsl:...
- 110k
1
vote
Is there a way to match a template spanning multiple XML nodes in XSLT?
The following stylesheet in XSLT 1.0 does the job.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" ...
- 8,730
0
votes
Generating Form (and XML result) using XSD(s)
Processing raw XSD documents in the general case is not easy, because there are so many features like named model groups, substitution groups, and types derived by extension that make it complex. If ...
- 153k
0
votes
Accepted
replace tag content in xml file using sed command
With the good tool, using xpath:
xmlstarlet edit -L \
-u '/property[./name/text() = "hive.metastore.schema.verification"]/value' \
-v false file.xml
Don't use sed nor regex to parse ...
- 164k
0
votes
Generating Form (and XML result) using XSD(s)
Java Metawidget's internal inspection format is already XML (albeit a String of XML, to avoid dependencies). See section 2.2.6 in the documentation:
<inspection-result xmlns="http://metawidget....
- 1,260
0
votes
> < symbol occurs error while XML parsing in MS SQL
It's unclear where your parsing error comes from, executing the SQL?
You should decide, if you store only valid xml in your database or if it is also allowed to store invalid xml.
To only store valid ...
- 1
2
votes
Accessing the elements of a list in R with something similar to xpath
If I understand correctly, simply applying unlist could suffice:
L <- unlist(l)
L
#> foo.bar.baz foo.bar.faz foo.bar.baz foo.bar.faz
#> "apple" "cat" "...
- 2,905
0
votes
Elegant Number Button not showing in Android Studio XML preview
I solved it by adding jcenter() as a repository in the application build.gradle file.
It seems that this dependency is only hosted on jcenter() and nowhere else.
Source - https://mvnrepository.com/...
- 41
2
votes
Accessing the elements of a list in R with something similar to xpath
Check this recursive function, inspired by this answer:
get_elements <- function(x, element) {
if(is.list(x))
{
if(element %in% names(x)) x[[element]]
else unname(unlist(lapply(x, ...
- 34.9k
1
vote
Accepted
Is there any way to get attribute value in xml, inside nested tag?
You need some XML-aware tool. For example, I'm maintainer of xsh where you can populate the value like this:
open file.xml ;
xcopy /xml/sometag/@name into /xml/sometag/nestedtag/text() ;
save :b ;
- 226k
1
vote
Accepted
XPath string-join with apostrophs for dynamic value set
You can try one of the following two XPath-2.0 approaches:
The inner-join:
concat("'",string-join(//employeePayrollID,"','"),"'")
...
- 27.9k
0
votes
How to show nested entries within the playlist window in VLC?
The suggestion provided by Marco R. didn't work for me.
In order to get the playlist to display correctly, you need to manually enable the setting shown below (Preferences -> Show All -> ...
- 96
1
vote
Accepted
Serializing ArrayList outputs ArrayOfAnyType
You may generate the required XML by modifying your data model as follows:
[XmlType(TypeName = "LineColletion")] // Fixed: TypeName. But do you want LineColletion (misspelled) or ...
- 98.7k
0
votes
SOAP PHP fault parsing WSDL: failed to load external entity?
To who else has the same problem, as for myself at the future: I'm having this kind of problem on Ubuntu Server 18 on Oracle Virtualbox and the issue was a netplan config error inside /etc/netplan/00-...
2
votes
Parse XML to CSV with python
To get product-id number you can use .attrib["product-id"]:
import xml.etree.ElementTree as ET
mytree = ET.parse('Salesforce_01_30_2023.xml')
myroot = mytree.getroot()
for product in ...
- 151k
0
votes
How to install xsl extension for PHP in windows version of MAMP?
You have to download a newer version of PHP through MAMP software.
Go to Languages > PHP and click on + and select 7.4.30.
After the download you can see that the folder MAMP/bin/php/php7.4.30/ext/ ...
0
votes
Parsing SOAP response in C#
Thanks for your response guys but I managed to solve it. In the namsspace manager, I made the following change
nsmgr.AddNamespace("x", "http://xmlns.example.com/abc/a6/AB/XYZ/V1");
...
- 21
Top 50 recent answers are included
Related Tags
xml × 212196java × 36375
android × 31089
c# × 28998
xslt × 23182
php × 18018
xpath × 12550
python × 11977
xsd × 9597
javascript × 8447
xml-parsing × 7762
html × 7087
parsing × 5832
.net × 5286
android-layout × 5110
sql-server × 5049
json × 4826
jaxb × 4668
sql × 4486
soap × 4016
jquery × 3976
linq × 3635
xslt-1.0 × 3131
dom × 3120
asp.net × 3056