Skip to content

Releases: veewee/xml

Version 1.7.0

02 Sep 06:44
1.7.0
818acdd
Compare
Choose a tag to compare

❗Warning ❗

  • PSL2 is currently not supported by @veewee in #37

What's Changed

New Contributors

Full Changelog: 1.6.0...1.7.0

Release 1.6.0

06 May 12:30
1.6.0
19daf66
Compare
Choose a tag to compare

What's Changed

  • Added function element_encode() by @lykciv in #32
$element = [
    'Lorem' => 'Ipsum',
];

element_encode($element);

Output

<Lorem>Ipsum</Lorem>

New Contributors

Full Changelog: 1.5.0...1.6.0

1.5.0

11 Mar 15:34
1.5.0
567c9bf
Compare
Choose a tag to compare

What's Changed

final class SecurityLocator
{
    public function __invoke(Document $document): \DOMElement
    {
        return assert_element(
            $document->xpath(new WssePreset($document))
                ->querySingle('/wssoap:Envelope/wssoap:Header/wswsse:Security')
        );
    }
}

Full Changelog: v1.4.0...1.5.0

Version 1.4.0

14 Feb 07:42
v1.4.0
75ec9f9
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3.0...v1.4.0

v1.3.0

11 Feb 07:07
v1.3.0
9c4e8c1
Compare
Choose a tag to compare

What's Changed

Examples

Use-case of above 2 features: You want to search for some data in SOAP, but decode it as an array afterwards - without any namespace info or prefix:

use VeeWee\Xml\Dom\Document;
use VeeWee\Xml\Dom\Traverser\Visitor\RemoveNamespaces;
use function VeeWee\Xml\Dom\Configurator\traverse;
use function VeeWee\Xml\Encoding\element_decode;

$doc = Document::fromXmlString(<<<EOXML
<?xml version="1.0"?>

<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">

    <soap:Body xmlns:m="http://www.example.org/stock">
        <m:GetStockPrice>
            <m:StockName>IBM</m:StockName>
        </m:GetStockPrice>
    </soap:Body>

</soap:Envelope>
EOXML
);

$method = $doc->xpath()->querySingle('//soap:Body')->firstElementChild;

var_dump(element_decode($method, traverse(new RemoveNamespaces())));
array(1) {
  'GetStockPrice' =>
  array(1) {
    'StockName' =>
    string(3) "IBM"
  }
}

Full Changelog: v1.2.0...v1.3.0

Version 1.2.0

17 Dec 13:33
v1.2.0
5f4b53c
Compare
Choose a tag to compare

What's Changed

  • Introduce copy_named_xmlns_attributes by @veewee in #24

Full Changelog: v1.1.1...v1.2.0

Version 1.1.1

17 Dec 08:54
v1.1.1
aea7bfd
Compare
Choose a tag to compare

What's Changed

  • Optimize duplicate namespaces on root by @veewee in #23

Full Changelog: v1.1.0...v1.1.1

Version 1.1.0

22 Nov 17:08
v1.1.0
71ab2c5
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.1...v1.1.0

Version 1.0.1

29 Oct 13:09
v1.0.1
185a018
Compare
Choose a tag to compare

Version 1.0.0

24 Sep 05:57
v1.0.0
8cbf2a2
Compare
Choose a tag to compare

Same as previous, but with a BC promise!