1,113 questions
0
votes
1
answer
95
views
How to validate an XML containing an inline schema with Powershell 5.1?
I created an XML with inline schema and wrote a Powershell script to validate my XML, but it was failing every time.
Not sure whether the problem lies with my XML or with the validating script, I ...
-3
votes
3
answers
152
views
C# XmlReader ignoring tags if no whitespace exists between them
I have an XML file with all the XML on one line as follows:
<route><name>CSX Atlanta Division Abbeville Sub</name><description>The Abbeville Subdivision runs from Tucker, GA to ...
0
votes
0
answers
77
views
C# Validate XML against a DTD in separate file throws security Exception
I'm trying to validate a simple xml file with an external dtd schema with schema and xml being in separate files. Unfortunately so far it only works when the dtd schema is defined in the xml DOCTYPE ...
0
votes
2
answers
45
views
How to read child value in XML in C#
I am using XMLReader in C# to read value of each acctNum but the problem is it skips record.
It will skip 1st record, then read 2nd, then skip 3rd, then read 4th and so on.
<acc><acctNum>...
0
votes
1
answer
75
views
Unable to retrieve attribute names/values from XmlReader after validation
I need to write a C# code to extract attribute info from XML when the validation fails. The code I have below is able to give me the exact attribute that fails the validation but I need additional ...
1
vote
0
answers
69
views
Using Multiple xmlReader.ReadToFollowing for multiple elements
I am trying to get different elements in single xmlreader creation
<Records>
<Teacher>
<Name>Gladstone<Name>
<Subject>Chemistry<Subject>
</...
0
votes
1
answer
90
views
Why my xsd is not automatically raising required field exception in C#
This is my XML
<?xml version="1.0" encoding="utf-8"?>
<Zones xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/...
1
vote
1
answer
88
views
How to select all the names of elements and their quantities from a XML file?
I have a link to the XML file.
I get it this way:
$xml = simplexml_load_file('http://example.com');
SimpleXMLElement {#1631 ▼
+"@attributes": array:1 [▶]
+"shop": ...
0
votes
0
answers
67
views
Extracting and Inferring Complex Classes from XML using xmlReader in C#
I have to read an XML document and create a list of products, each product has an id and other properties that I'm interested in. The problem is, that if the product has the tag then the object will ...
3
votes
3
answers
1k
views
PHP XMLReader parser error : xmlParseCharRef: invalid xmlChar value
I'm parsing a very large Xml files, so I need to use the XMLReader of PHP.
They cannot be modified from the source. So they have to be parsed as they are.
The problem is that the documents contain ...
0
votes
0
answers
55
views
C# XMLReader acts up after attempting to read a too big element
I have a very simple XML, but where one child element is a DNA string. This string can be anything from a few hundred characters long to 3 billion (like in the human genome). Of course reading a ...
0
votes
1
answer
196
views
Writing a XML linter in PHP, but both XMLReader and XML parser can't handle parsing error
I'm tasked to write a XML linter in PHP8 and it shall server as a web API. This XML linter must work in verbose mode that goes through the whole document and log every error found (up to 1000 errors) ...
0
votes
1
answer
806
views
PHP XMLReader failing with huge input lookup error [closed]
Suddenly, my code that has been working well started returning this error
Message:
XMLReader::read(): compress.zlib://file.gz:2: parser error : internal error: Huge input lookup
This is happening on ...
-1
votes
2
answers
163
views
Get position in String from line number and line position
I am using the XmlReader to parse XML data received over a socket. The data is sometimes broken into separate packets and when that happens, XmlReader will throw an XmlException for the incomplete XML....
0
votes
4
answers
78
views
PHP - How to identify and count only parent elements of a very large XML efficiently
I have a very large xml file with the following format (this is a very small snip of two of the sections).
<?xml version="1.0" standalone="yes"?>
<LaunchBox>
<Game&...