Re: [Simple-support] External entity reference problems
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2012-10-14 10:48:07
|
Hi, I think this is a problem with the StAX configuration you are using or perhaps your classpath. Simple does not directly deal with the XML, it only wraps various APIs like StAX, DOM, and XmlPull. Thanks,Niall --- On Wed, 10/10/12, Lars Carlsson <lar...@na...> wrote: From: Lars Carlsson <lar...@na...> Subject: [Simple-support] External entity reference problems To: "'sim...@li...'" <sim...@li...> Received: Wednesday, 10 October, 2012, 9:39 AM Hello! I am using simpleXml and I really like it a lot. I have a special case though where I am referring a xml file that contains an external entity referencing to another xml file. The reference looks like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE run [ <!ENTITY e SYSTEM "file.xml"> ]> <run><iMessageList class="java.util.ArrayList">&e;</iMessageList></run> I run a program from path A and reference the 2 xml files that are located in path B. When I load the xml file and parse it with Java streaming API for Xml (StAX) it works fine. When I do the same with SimpleXml I get an error indicating it cannot find the path of the file. The path that simpleXml expects is the path A, where I started the program and not path B where I have the xml files. I checked the XML spec (http://www.w3.org/TR/REC-xml/#dt-extent) and I can find some info about this: “Unless otherwise provided by information outside the scope of this specification (e.g. a special XML element type defined by a particular DTD, or a processing instruction defined by a particular application specification), relative URIs are relative to the location of the resource within which the entity declaration occurs.” Anyone knows if this is a bug? Best regards and thanks for a great XML api! Lars -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |