Switch through top level elements

I got a problem in xslt. My problem is, that I got a line in xml, which should be replaced by xsl. I want to replace a informatica file, which was generated by informatica itself. At first, here is my xsl: <xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”> <xsl:output method=”xml” indent=”yes” omit-xml-declaration=”no” media-type=”string” encoding=”ISO-8859-1″ doctype-system=”deftable.dtd” /> <xsl:template match=”node()|@*”> <xsl:copy> <xsl:apply-templates select=”node()|@*”/> </xsl:copy> </xsl:template> <xsl:template…
Read more

Infrequent existence of node in xml elements

<ObjectArrayToXml xmlns=”http://www.something.com/”> <itemslist> <Size>18</Size> <ItemInfo> <Pass>5225</Pass> <AgentName>aaaaaa</AgentName> <Document>6763</Document> </ItemInfo> <ItemInfo> <Pass>1223</Pass> <Document>77755</Document> **here the tag of AgentName will be missing </ItemInfo> <ItemInfo> <Pass>45344</Pass> <AgentName>bbbbbbb</AgentName> <Document>22234</Document> </ItemInfo> </itemslist> </ObjectArrayToXml> we are getting the above structure with all 3 tags Pass,AgentName,Document for each item for more than 4 years we been pharsing and printing it successfully like that: Set NodeList = xmlDoc.documentElement.selectNodes(“//ObjectArrayToXml/itemslist/ItemInfo”)…
Read more

How to read node in xml with condition

This is my XML file <problem> <sct:fsn>Myocardial infarction (disorder)</sct:fsn> <sct:code>22298006</sct:code> <sct:description>Heart attack</sct:description> <sct:description>Infarction of heart</sct:description> <sct:description>MI – Myocardial infarction</sct:description> <sct:description>Myocardial infarct</sct:description> <sct:description>Cardiac infarction</sct:description> <sct:description>Myocardial infarction</sct:description> </problem> how to select Code and fsn if i have description. please help thanks Source: xml

Outputting from one layout to another

I have 2 layouts named Layout X(Baby_diaper) and layout Y(Baby_milk). In layout X, I worked to output the details from Layout X to Shopping List layout(This layout is the overall receiver of all items) when I click the “Add to cart” button. Now, when I used the same codes in Layout Y, I mean reedit according to the details of…
Read more

Callback in android(Network call in separate class)

I have layout xml name main.xml and i have main.java class in that class now i send network call and get data from rest service.But now i want to separate network call in anohther class.How can i do that. main.xml <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical” tools:context=”.MainActivity” > <TextView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”@string/hello_world” /> <Button android:id=”@+id/callsubclass” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:text=”Call sub-class” />…
Read more

Need help in update a CLOB field(xml type) in oracleI

I have a column with CLOB and it has a data of type xml <?xml version=’1.0′ encoding=’UTF-8′?><testRules version=”1.0″><rule id=”1839″ name=”remit_amount.minimum.dollar_amount”><value order=”1″ modifiedBy=”admin” modifiedDate=”04/10/2012 15:04:49″>5.00</value></rule><rule id=”1840″ name=”remit_amount.maximum.dollar_amount”><value order=”1″ modifiedBy=”admin” modifiedDate=”04/10/2012 15:04:49″>1000.00</value></rule></testRules> Now I want to update <rule id=”1840″>‘s <value to 1500.00. Please help me to get the right update script for the above change. Source: xml

Why the value of the tag isn’t outputted

I am new in XSLT and I don’t understand the basic idea of templates. I am doing an experiment to see if the output is what I expect. Unfortunately not. This are the files in transformation: The XML: <?xml version=”1.0″ encoding=”UTF-8″?> <catalog> <cd> <title>Empire</title> <artist>Bob Dylan</artist> <continent>America</continent> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <country>Bulgaria</country> <company>CBS…
Read more

Transform XML to HTML table

I want to transform xml to html using xsl but I’m struggling to make it work although it should be pretty straightforward. Input XML: <EEExport Version=”201510″ Language=”International” LanguageIsoCode=”int-INT”> <Navigation> <Navigation Name=”Navigation” NavigationID=”E905C889-63EF-431E-BD74-A470685F65E0″> <Navigation Name=”Oven” NavigationID=”B929861A-57D1-4C20-BE2C-0DC006F4D6CE”> </Navigation> <Navigation Name=”Cooker” NavigationID=”643B0A58-D83B-4D8F-9E97-A5C8E572B1E5″> </Navigation> <Navigation Name=”Dishwasher” NavigationID=”FAB9B544-109D-4B83-A6E4-25114E1D25BA”> <Product ProductID=”887B5B3C-F9C7-4F4A-8E0B-1FC62830C508″> <MasterData> <Brand>Brand1</Brand> <ProductCode>911 424 310</ProductCode> <Category ID=”B1679547-77B2″>Dish_Washer</Category> </MasterData> <Containers> <Container ContainerName=”STechSpec_Dish_Washer”> <Attribute AttributeID=”36214A61″ Name=”ModelD” >F55600IM0P</Attribute>…
Read more

NullPointer exception in TestNG while run test using xml

Try to automate my test using TESTNG framework in eclipse. In Project I use one packet iEDGE and write all test methods in single Class named eLogin. But when I try to execute the code it shows nullPointer exceptions. Following is my sample code and xml settings that I use to run my test case. Can any one help me…
Read more