-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to parse XML #34
Comments
Interesting result. It shouldn't have had any issues, so I'll have to do some deep inspection of the code with your sample XML. I may have inadvertently introduced a bug somewhere we don't yet properly test for. |
Hi! More info about this issue: Thanks |
@mubinov - do you have sample XML that causes this error? |
Error: Illegal string offset 'num' |
This code works well:
i.e. without any spaces and new lines |
Ah. Right. Got it. Stupid mistake; easy fix. I'll try to get that taken care of as soon as I have my laptop out. |
Great guys, thank you for fixing this issue! :) |
It hasn't been merged yet, but it looks good, now. Should be in 4.2, though this change totally fits the definition of a 4.1.1 under SemVer. |
Checking XML for spaces and new lines. Fixed #34
I think this update has created an unintended bug as I have discovered the root tag is taken as the last tag at the first tab indent not the opening tag. here is an example: <?xml version="1.0" encoding="utf-8"?>
<Orders>
<Order>
<Meta>
....
</Meta>
<Header>
....
</Header>
....
</Order>
</Orders> results with array of:
As you can see it completely ignores the '' tag. However if you indent the Order tag it includes it. A fix for this would be appreciated Thanks |
Hey guys,
I am using the package in a small Laravel Website I am creating for a chess club. Today I ran composer update which was updated the following packages:
While I was still using parser version 4.0 I was able to import and parse the XML File from [https://ssl-account.com/sbrp-ergebnisdienst.de/index.php?p1=0:ee:BK6-16&style=2]. Therefore I am simply using the following code:
$xml = file_get_contents($url); $xmlArray = Parser::xml($xml);
Unfortunately since I updated the package to 4.1 I get a ParserException in XML.php line 33: Failed To Parse XML. However it was working before and I do not understand the changes.
I would really appreciate your help guys.
Thanks!
Tobias
The text was updated successfully, but these errors were encountered: