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
0
votes
1 answer

XOM convert XML (SVG) into XSL stylesheet

I'm trying to turn an SVG file into an XSL stylesheet as per this article:http://www.linuxjournal.com/article/9283?page=0,0 I've tried to simply construct a new document with the svg data inserted between the XSL related elements however when I…
user1819688
  • 53
  • 1
  • 6
0
votes
1 answer

Conflict between Spring and XOM

In my Java program, I made a class that uses XOM to read XML files. I am also using Spring. When the line: ApplicationContext ctx = new ClassPathXmlApplicationContext("dataIO-beans.xml"); is executed, I get an exception that…
korshyadoo
  • 337
  • 7
  • 18
0
votes
1 answer

Java: Does nu.xom.Builder properly close Files?

I am using nu.xom.* for my project, link found at http://www.xom.nu/. My question is about the following part of my code: private void open() { builder = new Builder(); try { document = builder.build(file); } catch…
skiwi
  • 66,971
  • 31
  • 131
  • 216
0
votes
1 answer

XOM or DOM approach for writing XML?

Which approach would be better to use as per the memory and usage context. DOM or XOM? for simple writing XML. Good Day
user2310939
0
votes
3 answers

Java XML Reading an XML file from top to bottom

I want to read an XML starting from the top to the bottom using Java. However, I don't want to use recursive functions because I want to be able to jump to a different element and start reading from that position. I've tried using getParent() and…
Mingwei Samuel
  • 2,917
  • 1
  • 30
  • 40
0
votes
1 answer

Anyway to get XOM to allow non-absolute namespaces?

I have some XML which is from a Microsoft sharepoint site. The opening lines are:
Nick
  • 617
  • 1
  • 7
  • 22
0
votes
2 answers

Applying xpath on XML where namespaces are with children with XOM

I'm using XOM library to parse xmls. I have the following XML
Samiron
  • 5,169
  • 2
  • 28
  • 55
0
votes
2 answers

Generating part of XML with namespaces with XOM

Though the description looks like really long, its actually quite straightforward. What I need I have the following xml document
Samiron
  • 5,169
  • 2
  • 28
  • 55
0
votes
1 answer

Reducing code redundancy while creating XML with XOM

I am using XOM as my XML parsing library. And i am using this for creating XML also. Below is the scenario described with example. Scenario: Code: Element root = new Element("atom:entry", "http://www.w3c.org/Atom"); Element city = new…
Samiron
  • 5,169
  • 2
  • 28
  • 55
0
votes
1 answer

Adding namespace to XML document without http:

I need to add the following namespaces to my XSD document: When I try to add the target namespace, it complains of…
One
  • 15
  • 2
  • 7
0
votes
1 answer

performance of xom xpath queries vs. jaxp xpath query vs. dom performance

What's difference between xom xpath impl. and jaxp xpath impl.? Most posts on this site say to use nu.xom over org.w3c.dom in java, and that dom parsing is faster than xpath. Why would you use nu.xom over jaxp xpath if the only use of the…
Sam Adamsh
  • 3,331
  • 8
  • 32
  • 53
0
votes
1 answer

Problems adding xom to Maven project

I am trying to use xom in a Maven project but am getting the error Description Resource Path Location Type ArtifactDescriptorException: Failed to read artifact descriptor for xom:xom:jar:1.2.5: ArtifactResolutionException: Failure to…
nomel7
  • 1,523
  • 3
  • 12
  • 20
0
votes
1 answer

XOM default namespace issue

I am trying to add a default namespace to a root element that is in a different namespace but XOM doesn't like this! e.g
madDerDog
  • 23
  • 5
0
votes
1 answer

StreamingPathFilter trims spaces

I use the XOM library to parse and process .docx documents. MS Word stores text content in runs () inside the paragraph tags (), and often breaks the text into several runs. Sometimes every word and every space between them is in a…
ttamas
  • 192
  • 1
  • 2
  • 15
0
votes
1 answer

XOM and getChildElements

I use this piece of Java with the XOM library to parse a sitemap. Element root = doc.getRootElement(); Elements urls = root.getChildElements("url"); When I'm debugging, I can see that root has a whole bunch of children, both url elements and text…
damd
  • 6,116
  • 7
  • 48
  • 77