cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Using XML Objects

lgilow-2
1-Visitor

Using XML Objects

I am working on a project that requires we manage XML Files. I noticed that ThingWorx provides an type that can be used for parameters. When using this I found that the creating a new XML object using the XML string will throw an exception if the XML includes the standard header:

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href=""?>

Removing the header I find that the XML object is created without an exception. The problem is that I can't seem to find any standard functions that can be used to parse the XML or traverse it's nodes.

Does the XML object when used in a service defined with JavaScript have any functions for accessing nodes and attributes?

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:lgilow-2)

Thingworx includes an E4X library

are you saying that you can't use the regular node type reference to parse the object?

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:lgilow-2)

Thingworx includes an E4X library

are you saying that you can't use the regular node type reference to parse the object?

vxavier
14-Alexandrite
(To:PaiChung)

Hi Pai Chung​,

I tried to use E4X but it doesn't reognize some terms. It gives to me sintax error. Do I have to make an import of the library in my code? I am trying to working with an xml soap and it's giving me some trouble. If you wanna mail me to see my code and help me in my problem will be great.

Thank you,

Vinícius Xavier.

PaiChung
22-Sapphire I
(To:vxavier)

I would do a search for SOAP there are a lot of examples.

Also SOAP features a lot of namespaces that can be escaped ... couldn't find my original article or post so :

trouble parsing XML

Announcements


Top Tags