xml

DOM parser for non xml

i want to parse the following type of text. Example1 <root>my name is <j> <b> mike</b> </j> </root> example 2 <root> my name is <mytag1 attribute="val" >mike</mytag1> and yours is <mytag2> john</mytag2> </root> can i parse it using a DOM parser?I will not have the same format evry time .I can have different formats in which the ...

Creating SVGs using Python

I'm building a set of SVG files that include an unfortunate number of hardcoded values (they must print with some elements sized in mm, while others must be scaled as a percent, and most of the values are defined relative to each other). Rather than managing those numbers by hand (heaven forbid I want to change something), I thought I mi...

Load XML File Php - Input is not proper UTF-8

Hi peeps, Im fairly new to php, and im trying to load an xml source from a remote location, so i have no control of the formatting. Unfortanely the xml file im trying to load has no encoding: <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <NODE> </NODE> </ROOT> When trying something like: $doc = new DOMDocument( ); $doc->load(...

Flash AS2 + XML

I'm trying to do one of the easiest thing to do in Actionscript, but the code just seems to want to work with the 3rd node of the XML. Here is the XML code: <?xml version="1.0" encoding="utf-8"?> <flags> <flag> <sigla>pt-br</sigla> <png>brazil.png</png> <nome>Portugues</nome> </flag> <flag> <sigla>esp</sigla> <...

Java built-in XML

Does Java have a built in XML library for generating and parsing documents? If not, which third party one should I be using? ...

can i create a xsl:function with param as node ?

I have a scenario to validate date from incoming xml file, which has effectiveTime as a element, the format of that element can be one of them as below 1) <effectiveTime value="YYYYMMDD"/> or 2) <effectiveTime> <low value="YYYYMMDD"/> <high value="YYYYMMDD"/> </effectiveTime> if the incoming file has the format specified ...

XML deserialization fail

I am deserializing the following XML file. Using XML serializer with VSTS 2008 + C# + .Net 3.5. Here is the XML file. <?xml version="1.0" encoding="utf-8"?> <Person><Name>=b?olu</Name></Person> Here is the screen snapshot for the display of the XML file and binary format of the XML file, If there are some solutions to accept suc...

XML comparison for checking whether same or different window applications

I have two XML file sitemap.xml and mouse.xml which look like below.Here the thing is that i need to compare sitemap.xml with mouse.xml in such a way that the tag <Name></Name>.I need to compare both xml file whether the content coming inside <Name></Name> tag is same or not in c# code Here the <Name></Name> tag are different means si...

Parsing unstructured documents into XML

I am parsing unstructured documents into a structured representation (XML) using a template to describe the intended result. A simple typical problem might be a list of strings: "Chapter 1" "Section background" "this is something" "this is another" "Section methods" "take some xxx" "do yyy" "and some..." "Chapter apparatus" "we created....

How to fix XML bug like this.

Hello everybody, I have XML file like this : <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> And i code in my php page: <? php $xmlDoc = new DOMDocument(); $xmlDoc->load("note.xml"); $x = $xmlDoc->documentElement; foreac...

How to decode shift-jis encoded data in an XML document using Cocoa (iPhone)

Hi, I have an XML document that may have shift-jis encoded data in it and I'm trying to parse it using an NSXMLParser object. Ordinarily I assume the document is UTF8 encoded and all is well - does anyone know if/how I can determine if an element is shift-jis encoded and then how to decode it? Thanks ...

Regexp to add attribute in any xml tags

Hello, I have well-formed xml documents into string variables. I want to use preg_replace to add a defined attribute to every xml tags. For example replace: <tag1> <tag2> some text </tag2> </tag1> by: <tag1 attr="myAttr"> <tag2 attr="myAttr"> some text </tag2> </tag1> So I basically need the regex expression to find any start tag...

DIA : creating connections

In a recent post on my blog, I showed how to transform the description of the mysql table to a DIA file using XSLT. Now I'd like to create the connectionsbetween the classes. Does anyone knows what would be the algorithm to create a connection between the given rows of two classes (I know how to get the connector ID but I would also ne...

SQL Server 2005: Problem updating XML column from .NET TableAdapter

I'm trying to update an XML column in a SQL Server 2005 table. Access to this column is through a stored procedure. I'm using a .NET tableAdapter to call this procedure. The problem: The value of the xml column does not get updated. Some observations: I used SqlProfiler to see if the stored procedure call is actually sent to the SQL S...

XML namespace in ASP.net MVC, C#

I'm trying to get an XML file generated using a namespace as such: <namespace:Example1> <namespace:Part1>Value1</namespace:Part1> </namespace:Example1> I've tried using [XmlAttribute(Namespace = "namespace")] public string Namespace { get; set; } but I'm clearly missing something. The structure I've used is [XmlRoot("...

Save text on XML file or Database.

Hi everybody, I'm working partime for an company and my boss ask me to make an module for prestashop to read/write news ( only Text ) into a XML file. But i think load text form XML will be slowly. Anybody can tell me save text in XML file or Database, which better and why?? Thanks. :) ...

Is there an official XML Schema (xsd) for EDI X12 856?

I am still fairly new to EDI, and learning it on a new job. We are using BizTalk for our EDI solution, and are converting the incoming EDI file into XML. I was having problems with a file from a new vendor, and at first thought the file might be incorrect. I have since learned that the file is correct, but our current XML schema is home ...

Merging XML Configuration files of different Application into one?

Application1 has a xml configuration file say: <Application1> <ConfigApp1>Value1</ConfigApp1> <App1Layout>Layout</App1Layout> </Application1> Application2 has a xml configuration file say: <Application2> <ConfigApp2>Value2</ConfigApp2> <App2Layout>Layout</App2Layout> </Options>Others</Options> </Application2> I want ...

Factoring in SEO on a Flash Site

There have been many debates about this topic already here, but none of them fully answered my question so I figured I would pose it and hope I get one or two decent answers. We're planning on relaunching our company website in the next few months. Our current site, for the most part, is text-driven and because of this we rank very well...

Xalan XSLT multiple output files?

I'd just like to know, is it possible to output the processing of a single input XML file to multiple other files using Xalan? I don't necessarily HAVE to do it that way, I know I can use other tools to do it (like Saxon), and/or I could process different files to obtain different outputs. I'd just like to know the options I have to do ...