Questions tagged [xom]

XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance.

XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance.

XOM is designed to be easy to learn and easy to use. It works very straight-forwardly, and has a very shallow learning curve. Assuming you're already familiar with XML, you should be able to get up and running with XOM very quickly.

References:

91 questions
1
vote
1 answer

How can I put a   into the content with xom

I want to generate   using xom. None of these work: private static void test(String s) { Element e = new Element("td"); e.appendChild(s); System.out.println("XML(\"" + s + "\"): " + e.toXML()); } private static void test()…
OldCurmudgeon
  • 64,482
  • 16
  • 119
  • 213
1
vote
1 answer

Xom serializer loses subsequent spaces in text

I have a recent problem with subsequent spaces. Im appending a text with subsequent spaces , to an XML element. the toXML method of Xom works fine but Writing thruogh a ByteArrayOutputStream with a Serializer is shrinking the spaces. String…
kommradHomer
  • 4,127
  • 5
  • 51
  • 68
1
vote
1 answer

Get all child elements disregarding namespace URIs

Sometimes I have an XML: ... and…
Yanko
  • 784
  • 8
  • 16
1
vote
1 answer

equals() for subclasses of XOM Element

I have created subclasses of XOM Element and would like to use them with Containers such as Set or HashMap. However these require an equals(Object obj) method. I have implemented an algorithm for equality but cannot use it as XOM.Node() declares…
peter.murray.rust
  • 37,407
  • 44
  • 153
  • 217
1
vote
1 answer

XOM + java retrieve a non-element value

here i'm trying to recover the extension value (the AnyType), which is not an element, so the "element.getchild()" and co do not work. Do you have an idea how to fix the problem ? Thanks.
ferjani
  • 89
  • 8
0
votes
1 answer

XOM.nu settings close tags format

How can I set uп Xom.nu in such a way that elements are closed like so: and not . The reason why I want to do it in this way is that this XML is going to be imported into a tool which, unfortunately recognizes the former…
LordDoskias
  • 3,121
  • 3
  • 30
  • 44
0
votes
1 answer

Comments getting escaped with NekoHTML (or JTidy) + XOM

I'm using NekoHTML to clean up some HTML, and then feeding it to XOM to get an object model. Somewhere in the course of this, comments are getting escaped. Here's a relevant example of the input HTML (most of the cut for clarity):
David Moles
  • 48,006
  • 27
  • 136
  • 235
0
votes
1 answer

Write soap XML using XOM

I'm trying to write a soap mesage with: using XOM. I'm creating the element…
jul
  • 36,404
  • 64
  • 191
  • 318
0
votes
1 answer

Using XOM with NetBeans

I am attempting to install XOM so I can use it in my Java apps. The only problem is, I don't know where I can place it so NetBeans can find it. It would make sense to put it where the other .classes files are, but I can't seem to find them…
Joseph Burley
  • 373
  • 1
  • 6
  • 14
0
votes
1 answer

Importing nu.xom.*;

Hello, I am trying to import nu.xom.*; Can anyone tell me why this import is not working. My SDK is Java 11. Do I need to add the project library?
Michael
  • 55
  • 1
  • 7
0
votes
1 answer

XOM and Canonical XML

I'm making a java application that checks if a XML file is already Canonical or not using XOM. In my tests I have the following file which is already Canonical.
arkhadi
  • 41
  • 2
  • 10
0
votes
3 answers

How do I take off the XML version tag in the XOM library for Java?

I'm writing a small application in Java that uses XOM to output XHTML. The problem is that XOM places the following tag before all the html: I've read their documentation, but I can't seem to find how to…
Nathan
  • 5,322
  • 5
  • 24
  • 24
0
votes
1 answer

Getting amount of children with XOM

name company a A
kskaradzinski
  • 4,954
  • 10
  • 48
  • 70
0
votes
2 answers

xom xsd validation fails because of root element being null

i have xsd and xml file. xml parse fine when validation is turned off. but with xsd validation it complains about root element in xsd being null. my xsd file is having multiple global elements. so basically this can be a problem. i guess from…
nBhati
  • 23
  • 1
  • 8
0
votes
4 answers

Best way to parse large XML document in Jython

I need to parse a large (>800MB) XML file from Jython. The XML is not deeply nested, containing about a million relevant elements. I need to convert these elements into real objects. I've used nu.xom.* successfully before, but now that I've…
clstaudt
  • 21,436
  • 45
  • 156
  • 239