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

Finding the exact location of an Element in a XML-Document

I'm looking for a way to find the exact location of an Element within a XML-Document. I parse my Document with XOM and process it in the usual way. The tricky thing is, that in the XML document, some scripts are embedded (just text nodes) and in the…
Malax
  • 9,436
  • 9
  • 48
  • 64
1
vote
1 answer

XOM: is Builder.build() thread safe?

Is Builder.build() thread safe? I couldn't find any info in XOM Javadoc.
Maciej Ziarko
  • 11,494
  • 13
  • 48
  • 69
1
vote
1 answer

"Could not find a suitable SAX2 parser" when i try parsing XML with XOM Tutorial

I'm trying to find a simple way to get XML content in my Android app. I gave XOM a try. Creating XML is no problem, but when i try to parse some... the emulator crashes with a force close. I have no idea where to look. I have the internet…
Switching Brains
  • 290
  • 4
  • 15
1
vote
3 answers

UnknownHostException after the attempt of reading a XML file

I have to serialise key/values of a map to a XML file, and then deserialise them. Map map = new HashMap<>(); // ... LinkedList l = new LinkedList(); Element root = new Element("root"); for (String str :…
luckystrrrike
  • 265
  • 3
  • 11
1
vote
2 answers

Unable to parse element attribute with XOM

I'm attempting to parse an RSS field using the XOM Java library. Each entry's image URL is stored as an attribute for the element, as seen below. Decision Paralysis
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
1
vote
2 answers

How to restrict an ENTITY tag in xml file using xsd

I have am xml code as below:
Debabrata Sahoo
  • 143
  • 2
  • 12
1
vote
1 answer

How to set an xml declaration in XOM use Java?

Element element = new Element("root"); Document document = new Document(element); document will auto generate How to set encoding, standalone into xml declaration use XOM ? I expect:
Luke Le
  • 728
  • 1
  • 9
  • 24
1
vote
1 answer

How to get a value from a XML with namespace but without prefix in Java?

well, this is the xml:
leoxs
  • 425
  • 1
  • 5
  • 15
1
vote
1 answer

Create xom Document from an xml string fragment containing namespace prefixes

I have a file containing an xml fragment. I need to add a child element into this file and resave it. I'm trying to use xom in Java (1.6). The problem is that the data in the file contains a namespace prefix so when I construct my Document object I…
DS.
  • 604
  • 2
  • 6
  • 24
1
vote
3 answers

convert nu.XOM.Element to org.w3c.dom.Element

Is it possible to convert nu.XOM.Element to org.w3c.dom.Element? Am trying to construct XML using XOM APIs. But few of my legacy APIs expects org.w3c.dom.Element. So, I just want to know if I can convert. Thank You :)
jai
  • 21,519
  • 31
  • 89
  • 120
1
vote
1 answer

Null Child Element when Parsing XML with XOM

I am using XOM to parse a xml file, but I am having an issue getting an Element by string name. I am able to access each element by iterating through getChild(x) where x=0:ChildCount, but it seems silly to have to hack my way around the software…
dberm22
  • 3,187
  • 1
  • 31
  • 46
1
vote
3 answers

Grails XOM linkageerror - SAXParserException

Possibly related: Grails - attempting to include HTPPBuilder - Linkage error I'm trying to include XOM in my grails project. How do I know which dependency library I need to exclude? I'm lost here. dependencies { build('xom:xom:1.1') { …
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
1
vote
2 answers

XOM get Document to String

Suppose I have a String like this: String from = "
Latmit
  • 11
  • 3
1
vote
1 answer

I am getting a fatal error using XOM: "[Fatal Error] :1:1: Premature end of file."

I don't seem to be making a duplicate post, so here's the details... When I parse the document using the non-static method Builder.build() from XOM (XML Object Model, a Java library), in the Eclipse console I get: [Fatal Error] :1:1: Premature end…
Treyzania
  • 103
  • 6
1
vote
2 answers

How to parse (non well-formed) HTML in android?

How to parse non well-formed HTML in android ? I tried to use XOM and TagSoup, but i get the following error when creating the Builder: 11-26 20:42:39.294: ERROR/dalvikvm(1298): Could not find method org.apache.xerces.impl.Version.getVersion,…
Kristof
  • 557
  • 6
  • 14