2018-10-22         Mirabelle

printing a count with XSLT

I have an XML file which I'm trying to transform into XHTML using a XSLT file. I was wondering if it's possible to get a count of the number of times a template has been invoked. This is my XML:<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" encoding="UTF-8" href="car.xslt" version="1.0"?><vehicle> <car> <make>Honda</make> <color>blue</color> </car> <car> <make>Saab</make> <color>red</color> </car></vehicle>And this is my XSLT:<?xml versi...

 xml                     3 answers                     83 view
 2018-10-22         Zachary

Unable to access XML file in spring

I am using spring and in that unable to read Spring.xml file.ApplicationContext context = new ClassPathXmlApplicationContext("Spring.xml");showing me this error:Caused by: java.io.FileNotFoundException: class path resource [Spring.xml] cannot be opened because it does not existxml pathemphasized text I would recommend using Maven to generate a new project. to answer your question refactor your project like below and it will be able find the xml on the classpathsrc/main/java - all your classessrc/main/resources - all your configuration, properties, xml, etc [XXX]

 xml                     1 answers                     75 view
 2018-10-22         Burnell

Spring 5 web service client issue with SOAP marshaling

When I try to call a web service with generated wsdl classes SOAP request is wrongly generating. Ex: SOAP request is generating with xmltype(names="xxx") instead of generating with @XmlElementRef(name="aaa") for arrays. this is causing XML validation issues on server side. Same is working in old version of spring 4.x web. I found solution by checking ObjectFactory class. It has different createXXX for xmltype and XmlElementRef. We need to identify correct QName and use while building jaxb request class. [XXX]

 xml                     1 answers                     43 view
 2018-10-22         Andre

Multi-dimensional arrays in Linq

I have an XML file similar to the following:<novel> <paragraphs> <paragraph> <choice>This is paragraph 1</choice> <choice>Paragraph 1 alternative text</choice> </paragraph> <paragraph> <choice>This is paragraph 2</choice> <choice>Paragraph 2 alternative text</choice> </paragraph> </paragraphs></novel>And I'm reading this into my program using LINQ. I am still learning LINQ. I'd like to have a 2-d array mapping of paragraphs and ...

 xml                     1 answers                     25 view
 2018-10-22         Leif

Is there an XML Editor with grid view similar to that of XMLSpy?

I have been testing out a few different xml editor/viewers and I can't seem to find any that have a feature that is comparable to XMLSpy's grid view. Another feature I'd like to find, but is a deal breaker would be XMLSpy's ability to "Copy as Structured Text". Haven't found anything similar to this either in the free varieties of xml editors/viewers.Anybody ever worked with a free xml editor that has the grid view option like XMLSpy? oXygen has a grid view for editing. oXygen is not free, but they do have a 30 day trial. Great editor for XML based work. The price is ...

 xml                     10 answers                     86 view
 2018-10-22         Jessie

XML Text Format

Does anyone know of a good program where I can paste in xml (getting it from a System.out in my java class) and it will format the xml so it's not a really long line of text? I like XMLPad. It has a nice formatter plus a bunch of visualisers such as tree view and grid view. There is also a nice interactive XPath query tool and probably many more features. [XXX]Visual Studio does this (you can download the express verison for free).If not, Try Liquid XML - it's free, and it's also got an xpath visualiser which is very handy. [XXX]Did you try your favorite browser? ...

 xml                     7 answers                     100 view
 2018-10-22         Thera

Storing XML document in pre-parsed binary format

My application need to store large amounts of XML-like hierarchical information with the following requirements:Fast to readMinimal memory consumptionTyped data instead of merely textAny suggestions for a binary format that fulfills these goals? you don't specify if xml is a format requirement you only say it needs to be hierarchical like xml.Without more detail on the kind of data it's hard to give you very much advice. So here's a small list.b-trees there are a number of libraries supporting b-tree storage formats in mulitiple languages. they have fast lookups and are ...

 xml                     6 answers                     21 view
 2018-10-22         Julian

How to insert fields extracted from XML in one table into another table?

I have one table (say messages) with primary_key and xml_data. I know how to extract several values from one xml_data value, like this:DECLARE @x XML = 'the XML value';WITH XMLNAMESPACES ( 'http://somenamespace/document' AS msg, 'http://somenamespace/externalMessage' AS dat)SELECT c.value('(dat:delivery_list/dat:identifier)[1]', 'varchar(20)') AS dl_identifier, c.value('(dat:created_on)[1]', 'datetime2(0)') AS created_on, c.value('(dat:delivery_list/dat:shipping_date)[1]', 'datetime2(0)') AS shipping_dateFROM @x.nodes('/msg:data/msg:body/msg:request/msg:da...

 xml                     1 answers                     93 view
 2018-10-22         Poppy

XPath to find last text node in element

How can I select the last text in element a?The element can have children elements.<a>bla di bla <b>foo bar</b> yes!</a>should give me "yes!" and<a>bla di bla <b>foo bar</b></a>should give me "foo bar" and<a>bla di bla</a>should give me "bla die bla" I would use //a/descendant::text()[last()], that selects the three text nodes yes!foo barbla di blain the sample<body><a>bla di bla <b>foo bar</b> yes!</a><a>bla di bla <b>foo bar</b></a><a>bla di bla</a...

 xml                     3 answers                     47 view
 2018-10-22         August

How to WRAP the elements in XSLT using for-each-group?

I want to Wrap value5 to value7 in a single node call COUNTRY using XSLTExample XML Document-<root> <root1> <root2> <value1>somevalue</value1> <value2>somevalue</value2> <value3>somevalue</value3> <value4>somevalue</value4> <value5>Australia</value5> <value6>India</value6> <value7>USA</value7> <value8>somevalue</value8> <value9>somevalue</value9> <value10>somevalue</value10> </root2> &l...

 xml                     1 answers                     51 view
 2018-10-22         Mirabelle

How to group different elements in one single div

verse outputclass elements in to a single group of element of div elment to the verse elements as shown in the below formatMy XML code is:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE topic PUBLIC><topic id="topic_31" xml:lang="en-US" outputclass="Back-Matter"> <title>Back-Matter</title> <body> <p outputclass="E-Head">E-Head</p> <p outputclass="F-Head">F-Head</p> <p outputclass="Body-Text">Body-Text (Tx)</p> <p outputclass="Body-Text-ContinuedTxc">Body-Text-Continued</p> ...

 xml                     1 answers                     49 view
 2018-10-22         Alfred

XInclude Schema/Namespace Validation?

I'm trying to use XML Includes to help manage a large XML structure that needs to be usable by both humans and machines.But am experiencing a myriad of problems when trying to construct XML files that can be validated against an existing schema. Here's a simplified example of what I'm trying to do.My "main.xml" file does not validate.<?xml version="1.0" encoding="UTF-8"?><!-- Main.xml - This fails to validate. --><ns1:main xsi:schemaLocation="http://www.example.com/main main.xsd" xmlns:ns1="http://www.example.com/main" xmlns:xsi="http://www...

 xml                     4 answers                     55 view
 2018-10-22         Vita

Traverse an XML Document in a SQL Server 2008 Database Column

I have a table that contains a column that is XML data type. I am looking to put a view over the entire table including the XML data type column. The view will expand contents of the XML data type column. I am having a problem being able to traverse the entire XML document and pick up values from particular XML nodes.I am using this SQL query and it's only picking up the first instance of value for the FuelPathwayCode XML node. I am looking to traverse an entire XML document and query ALL values of the /FuelPathwayCode XML node in one result set? SELECT UploadFileID,...

 xml                     2 answers                     32 view
 2018-10-22         Myron

%%X was unexpected at this time

I try to make a batch script using the tidy software like this: But I don't know much about Batch scripting. Here is the code:I tried this:C:\Users\user>for /d %%X in (C:\<C:\Users\user\Desktop\qq>\*) #parent dirdo (c:\<C:\Users\user\Downloads\tidy-5.6.0-vc14-32b\tidy-5.6.0-vc14-32b\bin>\tidy.exe -m -xml -config c:\<C:\Users\user\Downloads\tidy-5.6.0-vc14-32b\tidy-5.6.0-vc14-32b\bin>\tidycfg.ini %%X\<O_DATA>.xml)gives: %%X was unexpected at this time.and if I delete one % gives:< was unexpected at this time.the ini file has:indent:yesindent-att...

 xml                     1 answers                     56 view
 2018-10-22         Marsh

Using batch code to mass xml formatting?

I have a folder that contains 50 subfolders each one of these contains 2 xml files O_DATA.xmlS_DATA.xmlSince they appear in one line in Notepad, I have to fix the formatting.I have found from a similar question here this code:@echo offsetlocal EnableDelayedExpansionrem Create a variable with spacesset "spaces= "for /L %%i in (1,1,5) do set "spaces=!spaces!!spaces!"rem Read the linefor /F "delims=" %%a in (input.txt) do set "line=%%a"set level=0:nextTag rem Separate first tag from line for /F "tokens=1* delims=<" %%a in ("!line!") do ( set "tag=%%a" set "lin...

 xml                     1 answers                     54 view
 2018-10-22         Caesar

Auto Deserialize XML into a class collection within Silverlight?

Sorry if this is generic in nature, but I have a question that maybe is related to my lack of understanding of some core underlying rules of .NET and Silverlight.I have a basic project at the moment that simply:An ASP.NET generic handler writes out XMLWithin Silverlight, I am using the WebClient object to get the XML output, in fact Ihave been running through Scott Gu's tutorial:Scott Gu's excellent tutorialI have used the example of LINQ TO XML to essentially load the XML into a class collection.. for example:XDocument saleslogdata = XDocument.Parse(e.Result);var logrecord...

 xml                     1 answers                     101 view

Page 1 of 321  |  Show More Pages:  Top Prev Next Last