Ошибка ниже, когда я пытался сгенерировать дерево XML из ответа xml
в kony-fabric
.
ошибка: Невозможно сгенерировать дерево XML
.Не удалось проанализировать ответ сервера, поскольку XML
недопустимо.ошибка в строке 3 в столбце 139: ошибка построения атрибутов
мой xml
ответ от konyfabric
:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/v1/xsl/xml_pretty_printer.xsl" type="text/xsl"?>
<categories currentPage="1" from="1" to="1" totalPages="1" total="1" queryTime="0.023" totalTime="0.028" canonicalUrl="/v1/categories(id="cat00000")?apiKey=lAqRUSojMrpkxyefjjfha" partial="false">
<category>
<id>cat00000</id>
<name>Best Buy</name>
<active>true</active>
<url>https://www.bestbuy.com/?cmp=RMX-cat</url>
<path>
<category>
<id>cat00000</id>
<name>Best Buy</name>
</category>
</path>
<subCategories>
<category>
<id>abcat0900000</id>
<name>Appliances</name>
</category>
<category>
<id>abcat0100000</id>
<name>TV & Home Theater</name>
</category>
<category>
<id>abcat0500000</id>
<name>Computers & Tablets</name>
</category>
<category>
<id>abcat0400000</id>
<name>Cameras & Camcorders</name>
</category>
<category>
<id>abcat0800000</id>
<name>Cell Phones</name>
</category>
<category>
<id>abcat0200000</id>
<name>Audio</name>
</category>
<category>
<id>abcat0700000</id>
<name>Video Games</name>
</category>
<category>
<id>abcat0600000</id>
<name>Movies & Music</name>
</category>
<category>
<id>abcat0300000</id>
<name>Car Electronics & GPS</name>
</category>
<category>
<id>pcmcat332000050000</id>
<name>Wearable Technology</name>
</category>
<category>
<id>pcmcat242800050021</id>
<name>Health, Fitness & Beauty</name>
</category>
<category>
<id>pcmcat312300050015</id>
<name>Home, Garage & Office</name>
</category>
<category>
<id>pcmcat254000050002</id>
<name>Smart Home</name>
</category>
<category>
<id>pcmcat252700050006</id>
<name>Drones, Toys & Collectibles</name>
</category>
<category>
<id>pcmcat142300050026</id>
<name>Best Buy Outlet</name>
</category>
<category>
<id>abcat0207000</id>
<name>Musical Instruments</name>
</category>
<category>
<id>cat09000</id>
<name>Gift Cards</name>
</category>
<category>
<id>abcat0010000</id>
<name>Gift Ideas</name>
</category>
<category>
<id>pcmcat128500050004</id>
<name>Name Brands</name>
</category>
<category>
<id>pcmcat1529524080138</id>
<name>Magnolia</name>
</category>
<category>
<id>pcmcat164600050001</id>
<name>Featured Offers</name>
</category>
<category>
<id>pcmcat1528819595254</id>
<name>Services</name>
</category>
<category>
<id>pcmcat230900050001</id>
<name>Best Buy Business</name>
</category>
<category>
<id>pcmcat356600050000</id>
<name>Best Buy Education</name>
</category>
<category>
<id>pcmcat144600050035</id>
<name>Electronics</name>
</category>
<category>
<id>pcmcat87800050001</id>
<name>Customer Service</name>
</category>
<category>
<id>pcmcat748302046864</id>
<name>Tech Help & Inspiration</name>
</category>
<category>
<id>sc_digital_platform</id>
<name>Digital Platform</name>
</category>
<category>
<id>pcmcat225600050002</id>
<name>Black Friday</name>
</category>
<category>
<id>pcmcat370900050002</id>
<name>Franchises</name>
</category>
<category>
<id>pcmcat140900050011</id>
<name>Top-Rated Products</name>
</category>
<category>
<id>pcmcat748302045953</id>
<name>AF TestingTemplates</name>
</category>
<category>
<id>pcmcat311300050017</id>
<name>Video Games, Movies & Music</name>
</category>
<category>
<id>pcmcat44800050004</id>
<name>Reward Zone</name>
</category>
<category>
<id>pcmcat140700050010</id>
<name>Special Sale</name>
</category>
<category>
<id>pcmcat128800050004</id>
<name>Reviews & Ratings</name>
</category>
<category>
<id>pcmcat149500050013</id>
<name>Best Buy Racing</name>
</category>
<category>
<id>pcmcat156400050050</id>
<name>Partsearch</name>
</category>
<category>
<id>pcmcat253600050018</id>
<name>e Gift Cards</name>
</category>
<category>
<id>pcmcat133200050003</id>
<name>Best Buy News</name>
</category>
</subCategories>
</category>
</categories>
Когда тот же API дает действительный xml
ответ в POSTMAN клиенте.
POSTMAN клиент действителен xml
ответ:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/v1/xsl/xml_pretty_printer.xsl" type="text/xsl"?>
<categories currentPage="1" from="1" to="1" totalPages="1" total="1" queryTime="0.062" totalTime="0.068" canonicalUrl="/v1/categories(id="cat00000")?apiKey=lAqRUSojMrpkxyefjjfha" partial="false">
<category>
<id>cat00000</id>
<name>Best Buy</name>
<active>true</active>
<url>https://www.bestbuy.com/?cmp=RMX-cat</url>
<path>
<category>
<id>cat00000</id>
<name>Best Buy</name>
</category>
</path>
<subCategories>
<category>
<id>abcat0900000</id>
<name>Appliances</name>
</category>
<category>
<id>abcat0100000</id>
<name>TV & Home Theater</name>
</category>
<category>
<id>abcat0500000</id>
<name>Computers & Tablets</name>
</category>
<category>
<id>abcat0400000</id>
<name>Cameras & Camcorders</name>
</category>
<category>
<id>abcat0800000</id>
<name>Cell Phones</name>
</category>
<category>
<id>abcat0200000</id>
<name>Audio</name>
</category>
<category>
<id>abcat0700000</id>
<name>Video Games</name>
</category>
<category>
<id>abcat0600000</id>
<name>Movies & Music</name>
</category>
<category>
<id>abcat0300000</id>
<name>Car Electronics & GPS</name>
</category>
<category>
<id>pcmcat332000050000</id>
<name>Wearable Technology</name>
</category>
<category>
<id>pcmcat242800050021</id>
<name>Health, Fitness & Beauty</name>
</category>
<category>
<id>pcmcat312300050015</id>
<name>Home, Garage & Office</name>
</category>
<category>
<id>pcmcat254000050002</id>
<name>Smart Home</name>
</category>
<category>
<id>pcmcat252700050006</id>
<name>Drones, Toys & Collectibles</name>
</category>
<category>
<id>pcmcat142300050026</id>
<name>Best Buy Outlet</name>
</category>
<category>
<id>abcat0207000</id>
<name>Musical Instruments</name>
</category>
<category>
<id>cat09000</id>
<name>Gift Cards</name>
</category>
<category>
<id>abcat0010000</id>
<name>Gift Ideas</name>
</category>
<category>
<id>pcmcat128500050004</id>
<name>Name Brands</name>
</category>
<category>
<id>pcmcat1529524080138</id>
<name>Magnolia</name>
</category>
<category>
<id>pcmcat164600050001</id>
<name>Featured Offers</name>
</category>
<category>
<id>pcmcat1528819595254</id>
<name>Services</name>
</category>
<category>
<id>pcmcat230900050001</id>
<name>Best Buy Business</name>
</category>
<category>
<id>pcmcat356600050000</id>
<name>Best Buy Education</name>
</category>
<category>
<id>pcmcat144600050035</id>
<name>Electronics</name>
</category>
<category>
<id>pcmcat87800050001</id>
<name>Customer Service</name>
</category>
<category>
<id>pcmcat748302046864</id>
<name>Tech Help & Inspiration</name>
</category>
<category>
<id>sc_digital_platform</id>
<name>Digital Platform</name>
</category>
<category>
<id>pcmcat225600050002</id>
<name>Black Friday</name>
</category>
<category>
<id>pcmcat370900050002</id>
<name>Franchises</name>
</category>
<category>
<id>pcmcat140900050011</id>
<name>Top-Rated Products</name>
</category>
<category>
<id>pcmcat748302045953</id>
<name>AF TestingTemplates</name>
</category>
<category>
<id>pcmcat311300050017</id>
<name>Video Games, Movies & Music</name>
</category>
<category>
<id>pcmcat44800050004</id>
<name>Reward Zone</name>
</category>
<category>
<id>pcmcat140700050010</id>
<name>Special Sale</name>
</category>
<category>
<id>pcmcat128800050004</id>
<name>Reviews & Ratings</name>
</category>
<category>
<id>pcmcat149500050013</id>
<name>Best Buy Racing</name>
</category>
<category>
<id>pcmcat156400050050</id>
<name>Partsearch</name>
</category>
<category>
<id>pcmcat253600050018</id>
<name>e Gift Cards</name>
</category>
<category>
<id>pcmcat133200050003</id>
<name>Best Buy News</name>
</category>
</subCategories>
</category>
</categories>