Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] strange problem on windows

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: marcx AT catbull.com
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] strange problem on windows
  • Date: Wed, 1 Jun 2005 08:45:52 +0200 (CEST)


hi xomers,

I solved this (was easy looking at examples at the website).


however Linux and Irix accept something like:

String inFilePath="/tmp/comlpex.xml";
....
later

Builder parser = new Builder();
Document d=parser.build(inFilePath);

while windows throws this:

nu.xom.ParsingException: Path contains invalid character:
\ at line -1, column -1.

changing the above to
FileInputStream in=new FileInputStream(new File(inFilePath));
Builder parser = new Builder();
Document d=parser.build(in);

solved this.
I just thought the first way should work on win + n*xen...

greetings


>
> I do a java-app on Linux, and I use XOM to parse a XML-file with multiple
> namespaces. I use javasdk1.4.2_07 and xom-1.0. Everything works fine and
> as expected...
>
> when I gave the app to the tester on windows(javasdk1.4.2_04, xom-1.0)
> suddenly the parser didn'twork anymore.
>
> the function I use in MyXom.java:
>
>
> Builder parser = new Builder();
> Document d=parser.build(inFilePath);
> Element rootElement = d.getRootElement();
> processChildren(rootElement);
>
> (the path to the xml file is ok, and we use the same files)
>
> and:
>
> public static void processChildren(Node current) {
>
>
> Logger.getLogger("ev").log(Level.FINE, "MyXom processing
> children");
> String data = "";
> if (current instanceof Element) {
> Logger.getLogger("ev").log(Level.FINE, "MyXom found element");
> Element temp = (Element) current;
> data = ": " + temp.getQualifiedName();
> if (temp.getQualifiedName().equals("Receiver")) {
>
> Elements elements = temp.getChildElements();
> for (int j = 0; j < elements.size(); j++) {
> Element child = elements.get(j);
> if (child.getQualifiedName().equals("Addressee")) {
> //something
>
>
> (snippped)
>
>
> however the windows setup never comes to processChildren(),and therefore
> does not get data from the xml-file.
>
> any idea?
>
> best regards,
> tia
>
> markus
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>


---------------------------------------------
gnupg public key
https://www.catbull.com/marcx/pub_key.html
fingerprint = 58CB E72F 9322 F050 292B 6828 3AF8 31A7 093C 17CF





  • Re: [XOM-interest] strange problem on windows, marcx, 06/01/2005

Archive powered by MHonArc 2.6.24.

Top of Page