xml

Class hierachies in a REST API

I am designing a REST service that could be used by many types of clients, most likely .Net, PHP, Flex and JavaScript. I am building the service using WCF and the REST starter kit. One of my main goals is to make it as simple as possible for all those clients to use the API. Let's say that the API deals with zoos. When the client cre...

Can I get Actionscript3 to type cast Numbers and ints in XML files as numbers and ints?

Everything seems to be a string right now & that kinda ruins the whole xml as an internal data structure thing, I don't need a big tree of string I need typed data :-/ Are there any changes I can make to either my XML files or my AS3 code that will force it to cast ints as ints and Numbers as Numbers? Or maybe some kind of type schema I ...

Parsing a XML File and Replacing Chosen Node With Values From Text File

I wrote a C# Winforms program to take a XML file and load values from a text file into each occurrence of that field which the user specifies on the UI. For whatever reason, the program inserts a carriage return on any nodes which don't contain a value. For example, it will do that to <example></example> whereas it will not misbehave on ...

OPENXML in Postgres

SQLServer has a very useful function called OPENXML. It works is used like this: DECLARE @idoc int DECLARE @doc varchar(1000) SET @doc =' <ROOT> <Customer CustomerID="VINET" ContactName="Paul Henriot"> <Order CustomerID="VINET" EmployeeID="5" OrderDate="1996-07-04T00:00:00"> <OrderDetail OrderID="10248" ProductID="11" Quantity...

How can I send a node (any) to an xsl:function?

Can I send a node to an XSLT function? For example: <books> <book> <author>a1</author> <price>10</price> <year>2009</year> </book> <!-- ... --> </books> Can I send the <book> element to a function - within that function I want to process the nodes under book (<author>, <price> or <year>) Can I create a xsl:function ...

Do you know a good freeware that creates C++ or C# classes (data model) from XSD?

I know examples but there are not free tools. Need one that is free and reliable. Thanks! ...

How to stop parsing xml document with SAX at any time?

I parse a big xml document with Sax, I want to stop parsing the document when some condition establish? How to do? ...

ready made parser in java

i have some user defined tag. for example data here , jssj .I have a file(not xml) which contains some data embeded in tags.I need a parser for this which will identify my tags and will extract the data in proper format. Eg <newpage> thix text </newpage> <tagD> <tagA> kk</tagA> </tagD> tags can also have some attributes as simlar...

Adding nodes with namespaces to an XML file with Nokogiri

Hello all, I'm having trouble editing an XML file. I'm currently trying to use Nokogiri, but I'm open to any other Ruby library to solve this problem. I'm trying to add a Node set inside another node set. Both have some interesting namespacing. Here's the code. I'm trying to add the new_node to the parent right after the first <p:sp> ...

how to read and pass the variables from xml file to php script

How can i read and pass the variables which are coming in through an xml file as an input to a php file ? Scenario is my COM object pulls data from an application, i need to pass this information to a php script. How can i do this ? Can i use xml to pass this info to a php file which is called by initiating a web browser. Any inputs wi...

Xml C# Delete Help ?

<?xml version="1.0" encoding="utf-8" ?> <NickContents> <Nick id="test" password="test1" /> <Nick id="test2" password="test1" /> <Nick id="nKm4T5c1UQKyfyVPscL99w==" password="nKm4T5c1UQKyfyVPscL99w==" /> <Nick id="zrtcPuJwJLYtQYzyLqYXYA==" password="i+n+EXfFKHAMsCafvn1uiQ==" /> <Nick id="Utn83sH6g1/8IO7GeE9NSA==" pass...

Howto make namespace attribute with groovy xml builder

How can i create an attribute with a namespace? To get the following output? <tns:catalogItem xsi:type="specialItem" /> This is how i do it yet: catalogItem( type:"specialItem"); But this generates the attribute without namespace, so its invalid <tns:catalogItem type="tns:specialItem" /> so i'm searching for something like this ...

Uploading an XML file, referencing an XSD, in ASP.Net

I have an XML file which is being uploaded to an ASP.Net page via the normal file upload control. When it gets up, I am attempting to validate and deserialize the XML. However, the code below is really very handy for validating an XML file which references it's XSD like this: xsi:schemaLocation="someurl ..\localSchemaPath.xsd" Howev...

How to get the warning message as a string when validating XML with schemaValidate() in PHP?

I have this code to validate an XML file against an XSD file: $file = 'test.xml'; $schema = 'test.xsd'; $dom = new DOMDocument; $dom->load($file); if ($dom->schemaValidate($schema)) { print "$file is valid.\n"; } else { print "$file is invalid.\n"; } If the xml file is invalid, then it says that it is invalid. The reason it ...

Best XML handling class in Java

Which is the best class in Java to work with XML documents? ...

How to move back in a nest of tags in xml

Hello, The best way to explain my problem is to give an example xml: <block> <if> <trans> <trans1> <text1>text</text1> </trans1> <trans1> <text1>text</text1> </trans1> </trans> <if> <trans> ....... </trans> </if> </if> </block> So to capture all the data ...

Returning Explicit Open XML results sets from a Table Value Function

I'm trying to return rows in Open XML form from a table value function in SQL Server (2008). I'm occasionally getting errors when I select the results with "for xml explicit" which suggest that the order of the results is not guaranteed to be the same as the order I insert into the output of the TVF. So my first question is: is that th...

C# Documentation - User Defined Tags

Hi all! I want to document my source (C# sources), indeed I use XML documentation tags defined. How I can define by specific tags? For example I use a lot Design by Contract assertions. I'd like to have documentation sections for preconditions, postconditions, invariants... It should be desiderable to write documentation like: /// <pr...

java xml validation JDK 1.5 JDK 1.6 difference

I have a problem with Java xml validation. I have the following xsd: <?xml version="1.0" encoding="utf-8"?> <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <xsd:element name="TEST"> <xsd:complexType> <xsd:sequence> <xsd:element name="LAST_NAME"> <xsd:simpleType>...

Axis2 - Date Format

Scenario The date format which is output as a response to the Web Service client by Axis2 is formatted as "2009-08-28+01:00". I would like to change this to show only the date without the timezone information (e.g.:"2009-08-28") Configuration Libraries Axis 2 1.4.1 WSDL <xsd:element name="StartDate" type="xsd:date" />; Question ...