bgarrels / omnixml Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/omnixml
Automatically exported from code.google.com/p/omnixml
Hello,
First of all thanks very much for omnixml, no doubt a very good way to deal
with XML from Delphi. I found a problem when retrieve some Javascript code from
a CDATA node.
If we save in a CDATA node something like the below Javascript line:
foo([['Hello', 'Brackets']]);
The Javascript code is saved OK, but, when we use the "GetNodeCData" function
from the "OmniXMLUtils" unit the result of such function is this:
foo([['Hello', 'Brackets');
** Note how the two end brackets are removed by "GetNodeCData" function.
I am using the latest OmniXML version which is available when I write this
issue, installed in Delphi XE2 and running Microsoft Windows 8.1.
Can anybody help me in some manner?
Thanks in advance and thanks for OmniXML.
Original issue reported on code.google.com by [email protected]
on 1 Jul 2015 at 10:39
Does omnixml support XPath functions - specifically "contains". The following
does not seem to work:
XPath expresstion: //*[contains(@xlink:role,'normal')]/link:loc/@xlink:label
<?xml version="1.0" encoding="UTF-8"?>
<link:linkbase xmlns:link="linking_namespace" xmlns:xlink="xlinking_namespace">
<link:presentationLink xlink:role="fancy">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
<link:presentationLink xlink:role="normal">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
<link:presentationLink xlink:role="funny">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
</link:linkbase>
I am using the code from the XPath demo supplied - am I doing something wrong?
Original issue reported on code.google.com by [email protected]
on 25 Jul 2013 at 10:10
What steps will reproduce the problem?
1. var n:IXMLNode;
2. n.ParentNode.ChildNodes.IndexOf(n)=-1
3.
What is the expected output? What do you see instead?
n.ParentNode.ChildNodes.IndexOf(n)<>-1
What version of the product are you using? On what operating system?
product OMNIXML.pas r22 by mremec on Mar 27, 2014
Please provide any additional information below.
To correct the error all typecasts of IXMLNode to Pointer must be changed
by typecasts IXMLNode as IUnknown to Pointer as shown below:
function TXMLCustomList.Add(const XMLNode:IXMLNode):integer;
begin
Result:=FList.Add(pointer(XMLNode as IUnknown));
XMLNode._AddRef;
end;
Original issue reported on code.google.com by [email protected]
on 18 Nov 2014 at 8:29
Expression: "//hasp[@id][feature[@id != 0]]"
XML:
<hasp_info>
<license_manager >
127.0.0.1
Windows 7 Professional
</license_manager>
<license_manager >
192.168.7.235
Windows 7 Professional
</license_manager>
<license_manager>
192.168.7.169
Windows 7 Professional
</license_manager>
</hasp_info>
Correct results returned by
1. http://www.freeformatter.com/xpath-tester.html
2. http://xpath.online-toolz.com/tools/xpath-editor.php
3. http://www.softpedia.com/get/Programming/File-Editors/XMLPad.shtml
Original issue reported on code.google.com by [email protected]
on 9 Dec 2014 at 5:33
see patch versus "Downloads OmniXML-latest.7z"
Original issue reported on code.google.com by [email protected]
on 11 Dec 2014 at 11:02
Attachments:
Further elaborating at http://code.google.com/p/omnixml/issues/detail?id=9
~~~~~~ Node ~~~~~
<hasp id="1299527092" type="HASP-HL">
<feature id="0" />
<feature id="16" />
<vendor id="54321"/>
<license_manager >
<ip>127.0.0.1</ip>
<osname>Windows 7 Professional</osname>
</license_manager>
</hasp>
I try to extract values using expressions like
"hasp/license_manager/ip"
"hasp/vendor/@id"
"hasp/@id"
Correct results returned by
No matches returned by OmniXML XPathSelect
However the broken expressions
"license_manager/ip"
"vendor/@id"
"@id"
Extract correct results in OmniXML and no results in reference tools
From the hindsight, the reference tools (that are normally used to debug and
settle the expressions), so they kind add invisible virtual "document-root)
node on top of it. While OmniXML works inside the node with the document.
But that is very confusing and unexpected.
I'd propose to add
XPathSelect(NodeList, expression) overload
and
XPathSelect(Node, expression, TreatAsDocument: boolean = false)
or XPathSelectAsDoc(Node, expression)
To make transplanting expressions from editors/debuggers into sources easier
Original issue reported on code.google.com by `[email protected]` on 10 Dec 2014 at 2:51
function DecimalSeparator: char;
begin
{$IFDEF Unicode}
Result := FormatSettings.DecimalSeparator;
{$ELSE}
Result := SysUtils.DecimalSeparator;
{$ENDIF Unicode}
end; { DecimalSeparator }
This exists in Delphi XE up, not in Delphi 2010 with Unicode
FormatSettings.DecimalSeparator;
Original issue reported on code.google.com by [email protected]
on 13 Sep 2012 at 9:18
Does omnixml support XPath functions - specifically "contains". The following
does not seem to work:
XPath expresstion: //*[contains(@xlink:role,'normal')]/link:loc/@xlink:label
<?xml version="1.0" encoding="UTF-8"?>
<link:linkbase xmlns:link="linking_namespace" xmlns:xlink="xlinking_namespace">
<link:presentationLink xlink:role="fancy">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
<link:presentationLink xlink:role="normal">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
<link:presentationLink xlink:role="funny">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
</link:linkbase>
I am using the code from the XPath demo supplied - am I doing something wrong?
Original issue reported on code.google.com by [email protected]
on 25 Jul 2013 at 10:03
Compile XPath Demo in XE2 and run it
All the tests would get "failed" status and show garbage instead of required
etalon results
Reason: desired results are kept in TList as PAnsiChar but are read from it as
PUnicodeString
fix: TfrmXPathDemo.FXPathResults : TStringList; -> and all the direct
consequnces
Original issue reported on code.google.com by [email protected]
on 9 Dec 2014 at 5:29
Please support xe5 android,ios
Original issue reported on code.google.com by [email protected]
on 23 Feb 2014 at 7:27
What steps will reproduce the problem?
1. Load sample XML file with <?xml ... ?> header (see below)
2. Save file back to disk
What is the expected output? What do you see instead?
I expected to see a single header line, but after loading the document from
disk an additional header line is added (and subsequently written back to disk).
What version of the product are you using? On what operating system?
v1.16 (2013-07-01) on Delphi XE2 / Win 7 x64
Please provide any additional information below.
Sample file:
data.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<system>
<items>
<item/>
</items>
</system>
var
gDoc : IXMLDocument;
begin
gDoc := CreateXMLDoc;
gDoc.Load('data.xml');
gDoc.XML now contains:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<system>
<items>
<item/>
</items>
</system>
Original issue reported on code.google.com by [email protected]
on 1 Oct 2013 at 10:08
For the attached XML, the XPath expression with the following predicate works:
//link:presentationLink[@xlink:role="funny"]
However, if the predicate contains a string with forward slashes, a syntax
error occurs:
//link:presentationLink[@xlink:role="www.google.com/testing]
Is there any chance that this might get fixed?
<?xml version="1.0" encoding="UTF-8"?>
<link:linkbase xmlns:link="linking_namespace" xmlns:xlink="xlinking_namespace">
<link:presentationLink xlink:role="fancy">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
<link:presentationLink xlink:role="www.google.com/testing">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
<link:presentationLink xlink:role="funny">
<link:loc xlink:label="part1"/>
<link:loc xlink:label="part2"/>
<link:loc xlink:label="part3"/>
</link:presentationLink>
</link:linkbase>
Original issue reported on code.google.com by [email protected]
on 25 Jul 2013 at 10:09
In OXmlCDOM.pas (TXMLDocument) i have not found any callback events while
loading file.
Is there any callbacks?
Original issue reported on code.google.com by [email protected]
on 19 Jan 2015 at 9:59
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.