Search in array and use it to save

I've been working this week on a special project with imports. the function that i have created import a xml from diffrent sources and save this in my database. My solution on that is: - Save al the keys that i want from the XML and save it into my...
more »

2017-03-18 19:03 (1) Answers

How do I handle a generic field in JaxB?

I have a parameterized class with a generic field like this and I'm trying to figure how how to write an adapter that will handle the generic field: public class Thing<T> { private T options; @XmlElement(nillable = true) @XmlNull...
more »

2017-03-18 17:03 (0) Answers

how to make this Staggered GridView?

Hi i was trying to make something like this through xml code in android studio but can't figure out how although i partially reached there but feels i am not using correct approach can someone please tell me how exactly i can make this layout through...
more »

2017-03-18 16:03 (1) Answers

xml bulk file editor increment by numbers

I am trying to prefix the TEXT_VALUE field's values by a number in incremental way in all my xml files only the tags called "TRANSL" with ID="Example". Currently I am doing it manually, but since I have several thousands of them, I think I should do...
more »

2017-03-18 14:03 (2) Answers

Selecting two attributes in XSLT

I want to select 'language' and 'food' from an XML, using XSLT, that has elements like this: <item id="1"> <language>Spanish</language> <food>Paella</food> <score>3.5</score> </item> ...
more »

2017-03-17 19:03 (2) Answers

Best way to map JAXB to a database table

I have an inbound xml which I am mapping to JAXB objects using the xjc tool (to build the pojos) I am wondering what the best approach is to map these objects to various tables. An Object / Xml can map to multiple tables which rules hibernate out ...
more »

2017-03-17 17:03 (5) Answers

XML element name of an attribute using Powershell

I would like to get the xml element name of an attribute using powershell. Can anyone please let me know if we have a built in function for the same. Following is my xml file called pricefile.xml <model type="model1" name="default" price="12.12...
more »

2017-03-17 07:03 (2) Answers

Concatenate with FOR XML changes encoding

I have a query which converts a number into a set of ASCII characters and then attempts to concatenate them into a string: declare @number int = 651854564 ;with cte as ( select @number prev_nr , cast(char(@number % 256) as nvarchar(100)) nextch...
more »

2017-03-16 16:03 (2) Answers

Extract data from SOAP response in PHP

I have this XML response coming from OSvC and I want to process it to extract sfdc_record_id and print its value a0t4C000000I8YPQA0. How to print that data in PHP? <pre> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelop...
more »

2017-03-16 15:03 (1) Answers

how to remove double Tool/Actionbar?

i donĀ“t know why this second Toolbar appears... I have attached my xml files for the Activit "ListActivity". After deleting one line in the XML the doublebar were gone in the Deign Preview in Android Studio, but when i run the App the second bar ...
more »

2017-03-16 15:03 (2) Answers

How to parse a .txt file into .xml?

This is my txt file: In File Name: C:\Users\naqushab\desktop\files\File 1.m1 Out File Name: C:\Users\naqushab\desktop\files\Output\File 1.m2 In File Size: Low: 22636 High: 0 Total Process time: 1.859000 Out File Size: Low: 77619 Hi...
more »

2017-03-16 14:03 (2) Answers

sed to find and replace a value in xml file

I have to run with sed for this job, without knowing the value (xxx), but only the attribute (revision) <types name="foo" revision="xxx"> to <types name="foo" revision="5678"> my first try is: sed 's@(revision=\").*@\1$5678\">@...
more »

2017-03-16 13:03 (2) Answers

Button showing when adding new fragment

I am adding a fragment on top of another (Fragment A -> Fragment B), yet when I do, the button from the first fragment is showing through. I don't get why adding a fragment on top of another is showing content from the first. Here is the first Acti...
more »

2017-03-16 07:03 (1) Answers

How to determine the nesting level in XPath?

In the following example, I would like to determine the "nesting level" of a node with an XPath (2.0) expression. This "nesting level" would be the number of consecutive descendants, e.g. if "span/span/span" exists, it would be 3. The expected nestin...
more »

2017-03-15 18:03 (1) Answers

Tag mismatch error-Android studio

I have trying for hours surfing online almost through every link both on stack overflow and google, but I couldn't find a possible solution for the Tag Mismatch error! I updated my android studio to the version 2.3 on ubuntu 16.04 lts. Before that i...
more »

2017-03-15 07:03 (0) Answers

Saving XML File from URL on my Server

I am able to put the following url in any browser and the xml appears after a few seconds... ftp://USER:PASSWORD@aphrodite.WEBSITE.net/exports/xml/products.xml I tried the following code in a php file so I can run a cron daily at midnight and for...
more »

2017-03-15 00:03 (2) Answers

VB.NET: xml childnode count is not right

I have programmed in VB since VB-DOS, but I'm just getting started with processing XML Files. I've learned a lot, but I am having a problem with one aspect that I can't seem to overcome. I'm running loops through child nodes at different levels, but...
more »

2017-03-14 22:03 (3) Answers

sqlcmd and/or PowerShell wrapping XML output

I'm executing the following command: sqlcmd -i "\\path\to\sqlfile.sql" -S "ServerName" -d "DBName" -y 0 Wherein sqlfile.sql is a handful of DECLARE statements for variables and then a tree of nested SELECT ... FOR XML Path('...') statements to ult...
more »

2017-03-14 18:03 (2) Answers

REGEX: Storing expressions in XML

I have a set of regular expressions that are being stored in a XML file. However, for an expression that contains && the .XML file fails validation. <expression>[a-zA-Z&&[^BALANCE\\s\\d+$]]</expression> Is there an alte...
more »

2017-03-14 13:03 (1) Answers

How to best save data which overlaps?

Say I have a text which is comprised of multiple chapters, which are comprised of multiple paragraphs, which are comprised of multiple sentences. In a JSON, I would maybe save this as follows: // Pseudo Code chapter { paragraphs { sen...
more »

2017-03-14 13:03 (2) Answers

TestNG XML not valid

I have some generated TestNG XMLs that worked for a long time, but recently they are invalid when I run them through Java's SAXParser and through http://www.xmlvalidation.com/ Example generated XML: <?xml version="1.0" encoding="UTF-8"?> <...
more »

2017-03-13 21:03 (1) Answers

Passing variable from bash to XQuery

I have a bash-script, that traverses through multiple directories and parses data from a few XML files. I am using XQilla to execute my XQueries. echo "---|Reading names|---" ../../xqilla .._name.fcs >> /var/lib/mysql-files/name.txt And this...
more »

2017-03-13 21:03 (1) Answers

xml-tei in R: selecting attributes in nodes

I have an xml-tei file: #in R doc <- xmlTreeParse("FILE_NAME" , useInternalNodes=TRUE, encoding="UTF-8") ns = c(ns = "http://www.tei-c.org/ns/1.0") namespaces = ns getNodeSet(doc,"//* and //@*", ns) doc I am looking at two elements inside...
more »

2017-03-13 13:03 (0) Answers