Error while creating new data file in HP-Exstream - hp-exstream

I am trying to create a data file for my application with XML as input and map it to my HP Exstream variables. But when I am trying to save the file it is giving me error "No customer-level tag specified! Engine will not process.". I am not sure how to resolve this error. There is no customer level information I want in my input. Can anyone explain what is this error and how to resolve it?

What HP Exstream is telling you is that you have not defined a tag that will allow Exstream to know when a customer begins and ends. This does not have to be a tag that says <customer-level>, but rather the tag you are using in the XML to determine where a customer begins and ends.
When you are using an XML file as input, you may be dealing with multiple customers take this for example:
<item>
<address>
<line>a</line>
<line>b</line>
</address>
<body>Hello World</body>
</item>
<item>
<address>
<line>c</line>
<line>d</line>
</address>
<body>Hello Universe</body>
</item>
I would be using the <item> tag to tell HP Exstream where my customer begins and ends.
You can choose the customer tag in the properties of the tags.

Related

LabVIEW Parsing XML String without using tools

I am creating an information displaying mini-app for a device. The response I receive from the device when I send an HTTP Get request is literally as follows:
<?xml version="1.0" encoding="iso-8859-2"?>
<root xmlns="http://www.papouch.com/xml/th2e/act">
<sns id="1" type="1" status="0" unit="0" val="25.0" w-min="" w-max="" e-min-val=" -0.3" e-max-val=" 124.0" e-min-dte="01/01/2014 13:16:44" e-max-dte="05/14/2014 10:00:43" /><sns id="2" type="2" status="0" unit="3" val="56.4" w-min="" w-max="" e-min-val=" 0.1" e-max-val=" 100.0" e-min-dte="01/27/2014 08:39:14" e-max-dte="03/04/2014 11:02:40" /><sns id="3" type="3" status="0" unit="0" val="15.7" w-min="" w-max="" e-min-val=" -21.3" e-max-val=" 85.9" e-min-dte="01/27/2014 12:21:28" e-max-dte="03/04/2014 11:29:32" /><status frm="1" location="NONAME" time="01/02/2014 7:12:00" typesens="3" /></root>
There are 3 sns elements with incrementing ids, I need to read the val attribute of the sns element with the id 1.
I tried implementing the suggested way here:Get specific XML element attributes in Labview , and shown below is my implementation, but it does not work. I tested the XPath on http://xpather.com/ and it fetches the value I need just fine.
The XPath I am using is: //root/sns[#id="1"]/#val
The result I get when I run is just nothing, no Parsing errors, no any other errors, everything seems to be okay but the String indicator is always empty, String 2 displays the HTTP response fine.
I am using (and have to use) LabVIEW 2011 SP1.
The reason why the result is empty is the wrong input of Get Node Text Content.

Exception cx_st_match_element when deserializing XML?

I'm having trouble getting a simple transformation for XML to work in ABAP. I keep getting the exception cx_st_match_element when I try to execute it on a test XML document inside of a report.
I have the following XML that I want to transform into an ABAP internal table:
<?xml version="1.0" encoding="UTF-8"?>
<studenten xmlns="http://www.foo.be/bar/preinschrijvingsflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.foo.be/bar/preinschrijvingsflow bar_studenten.xsd">
<student>
<barGuid>1</barGuid>
<familienaam>Doe</familienaam>
<voornaam>John</voornaam>
<geslacht>1</geslacht>
<nationaliteit>BE</nationaliteit>
<geboortedatum>1995-11-18</geboortedatum>
<geboorteplaats>Antwerpen</geboorteplaats>
<email>John.Doe#gmail.com</email>
<straatNummer>Grote Markt 1 bus 0102</straatNummer>
<postcode>1000</postcode>
<gemeente>Brussel</gemeente>
<land>BE</land>
<telefoonnummer>+32123456789</telefoonnummer>
<academiejaar>2021</academiejaar>
</student>
</studenten>
To this end I defined the following simple transformation I called zc_tr_student:
<?sap.transform simple?>
<tt:transform
xmlns="http://www.foo.be/bar/preinschrijvingsflow"
xmlns:tt="http://www.sap.com/transformation-templates"
xmlns:ddic=" http://www.sap.com/abapxml/types/dictionary">
<tt:root name="studenten" type="ddic:ZCTT_bar_STUDENT"/>
<tt:template>
<studenten>
<tt:loop ref=".studenten" name="studenten">
<student>
<barGuid tt:value-ref="$studenten.bar_guid"/>
<familienaam tt:value-ref="$studenten.familienaam"/>
<voornaam tt:value-ref="$studenten.voornaam"/>
<geslacht tt:value-ref="$studenten.geslacht"/>
<nationaliteit tt:value-ref="$studenten.nationaliteit"/>
<geboortedatum tt:value-ref="$studenten.geboortedatum"/>
<geboorteplaats tt:value-ref="$studenten.geboorteplaats"/>
<email tt:value-ref="$studenten.email"/>
<straat_nummer tt:value-ref="$studenten.straat_nummer"/>
<postcode tt:value-ref="$studenten.postcode"/>
<gemeente tt:value-ref="$studenten.gemeente"/>
<land tt:value-ref="$studenten.land"/>
<telefoonnummer tt:value-ref="$studenten.telefoonnummer"/>
<academiejaar tt:value-ref="$studenten.academiejaar"/>
</student>
</tt:loop>
</studenten>
</tt:template>
</tt:transform>
In the tt:value-refattributes I refer to the field in the DDIC line type of the ABAP internal table corresponding to the tag in the XML.
If I call this simple transformation from an ABAP report like this:
call transformation zc_tr_student
source xml lv_bxml
result studenten = p_student.
The cx_st_match_element is thrown.
I validated both the syntax of the file and its adherence to the schema. The XML file and the XSD file are present in the same directory on the application server. I have no idea why the ST fails as the cx_st_match_element instance does not have any useful information except that it expected a studenten element. That element is clearly present in the XML file as the root element.
I'm inexperienced with defining simple transformations and I can't spot my error myself. Thank you in advance for your help,
Joshua

TBXML not parsing TBXMLElement text, while child element tags also present in existing parent tag?

My XML is like this:
<office>
<item>
NOIDA OFFICE:
<OfficeAddress>B-20, SECTOR 57 NOIDA (U.P) 201301</OfficeAddress>
</item>
</office>
And I am trying to parse with TBXML parser.
Here my problem is, OfficeAddress value is accessible as a child element of item but text of <item> NOIDA OFFICE: is not getting parsed.
Its showing me text of <item> is NULL and showing only one child element <OfficeAddress> with associated text.
I want to parse NOIDA OFFICE: as item name. Anyone please help me, Advance appreciate on your help.
Happy coding :)
I think you are not able parse your XML. Please change the xml in server side like this.
<Office>
<item name=NOIDA OFFICE>
<OfficeAddress>B-20, SECTOR 57 NOIDA (U.P) 201301</OfficeAddress>
</item>
</Office>

is it possible to have dynamic tour from real time data kml

Is there a way to make a tour that is getting the coordinates from a script and updating the tour?
I am getting the data from a python script and then want to update the fly to coordiantes in the tour in real time but dont know how to do that
I tried using a network link but it wasnt working and im not sure if i use the animatedupdate or not
I haven't tried it, but it may be possible using a NetworkLinkControl in KML. You would need a total of four KML files to achieve it. In your scenario the first three could be hard coded, and the fourth could generate from your python script.
load-tour.kml - a NetworkLink file that loads tour.kml
tour.kml - a file that holds the original KML tour data
update-tour.kml - a NetworkLink file that loads the updated tour new-data.kml
new-data.kml - a NetworkLinkControl that updates the original tour.kml
Here are the four files, I have missed out the KML declaration and root element for brevity...
load-tour.kml
<NetworkLink>
<name>load</name>
<Link>
<href>tour.kml</href>
</Link>
</NetworkLink>
tour.kml
<Document>
<gx:Tour id="myTour">
<name>tour</name>
<gx:Playlist id="myPlaylist">
<!-- existing tour data goes here -->
</gx:Playlist>
</gx:Tour>
</Document>
update-tour.kml
<NetworkLink>
<name>update</name>
<Link>
<href>new-data.kml</href>
</Link>
</NetworkLink>
new-data.kml
<NetworkLinkControl>
<Update>
<targetHref>tour.kml</targetHref>
<Change>
<gx:Playlist id="myPlaylist">
<!-- new tour data goes here -->
</gx:Playlist>
</Change>
</Update>
</NetworkLinkControl>
Here is the documentation on the networklinkcontrol and its use in updating data.
https://developers.google.com/kml/documentation/kmlreference#networklinkcontrol
https://developers.google.com/kml/documentation/updates
You can have a NetworkLink update the camera position automatically by using flytoView. It's not an actual Tour but works similarly. Each time it loads the link, it flies to a new LookAt or Camera element in the linked KML.
root.kml
<NetworkLink>
<Link><href>new_camera.kml</href></Link>
...
<flyToView>1</flyToView>
</NetworkLink>
new_camera.kml
<Document>
<Camera>...
or
<LookAt>...
</Document>
I haven't had success updating a playing Tour from NetworkLink, other than changing the Tour name element. I tried starting a looping Tour and then changing the Playlist or FlyTo elements from NetworkLinkControl, but I only see the camera change if I manually restart the Tour.

how to avoid sequence using XSD

i want a particular sequence to be generated in a random manner
<item>
<i1>abc</i1>
<i2>pqr</i2>
</item>
now how can i make an xsd where <i1> can come before <i2> ?
use the 'all' indicator as shown on the w3schools website